Stop using ifconfig, you are being old [ifconfig alternative]

Hey, why are you still using ifconfig? Did you not know that there is another command available on your Linux environment which will provide you more information?!

I am talking about the “ip a” command which will provide you direct insight in all types of network information.

For example, you can use “ip addr show” or “ip link show” and it will show you the selected command. If you use the “ip -help” command, you will get a list of available commands which can be used in the “ip” environment.

Show network devices and configuration

ip addr show
ip link show

Enable a network interface 

ip link set eth0 up
ip link set eth0 down

Set IP address

ip address add 192.168.0.77 dev eth0
ip addr add 192.168.0.77/24 broadcast 192.168.0.255 dev eth0

Delete an IP address

ip addr del 192.168.0.77/24 dev eth0

Add alias interface 

ip addr add 10.0.0.1/8 dev eth0 label eth0:1

ARP protocol

ip neigh add 192.168.0.1 lladdr 00:11:22:33:44:55 nud permanent dev eth0
ip link set dev eth0 arp off

Go ahead and try it!

ip a command in linux example