Skip to content

Instantly share code, notes, and snippets.

@phuongtailtranminh
Created November 17, 2016 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phuongtailtranminh/6a9df7d8a075ef6352feab1044fe3990 to your computer and use it in GitHub Desktop.
Save phuongtailtranminh/6a9df7d8a075ef6352feab1044fe3990 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