Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sahanasj/4f2f360ec9ef70ee56730e5998774be9 to your computer and use it in GitHub Desktop.
Save sahanasj/4f2f360ec9ef70ee56730e5998774be9 to your computer and use it in GitHub Desktop.
Linux Network Commands
Network Interface Configurator.
- View network settings of an ethernet adapter:
ifconfig eth0
- Display details of all interfaces, including disabled interfaces:
ifconfig -a
- Disable eth0 interface:
ifconfig eth0 down
- Enable eth0 interface:
ifconfig eth0 up
- Assign IP address to eth0 interface:
ifconfig eth0 ip_address
Sometimes after restored the entire system to the new machine, the interface doesn't work and it got new name.
In this case, use both commands:
ifonfig -a && ifconfig eth_name up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment