I’m an old school guy. I learned to use ifconfigin the old times and, with ifconfig, I continue until today.
But, for a while, there is a new contender ip. ip is a network tool called to replace ipconfig, is installed on all modern gnu/linux distributions, and, it’s more powerful than ipconfig.
So, it’s time to learn ip, and, what better way to do it than by keeping a cheeatsheet with the most used commands?
Syntax
1
| ip [OPTIONS] OBJECT {COMMAND}
|
Display IPv4 addresses
Display IPv6 addresses
Bring down a network interface
Bring down a network interface
Assing an IP address to a network interface
1
| sudo ip address add 10.0.0.1/24 dev eth0
|
Deleting an IP address
1
| sudo ip address del 10.0.0.1/24 dev eth0
|
Enjoy! ;)