Cheat Sheet: ifconfig vs ip

Awesome! Here’s a quick comparison of commonly used ifconfig commands vs their modern ip equivalents:


🧠 Cheat Sheet: ifconfig vs ip

Task ifconfig ip (modern)
Show all interfaces ifconfig ip a or ip addr show
Show a specific interface ifconfig eth0 ip a show dev eth0
Bring interface up ifconfig eth0 up ip link set eth0 up
Bring interface down ifconfig eth0 down ip link set eth0 down
Assign IP address ifconfig eth0 192.168.1.10 ip addr add 192.168.1.10/24 dev eth0
Remove IP address Not easily possible ip addr del 192.168.1.10/24 dev eth0
View routing table route -n ip route
Add a route route add ... ip route add ...
Delete a route route del ... ip route del ...
Show MAC address ifconfig -a ip link show

🔍 TL;DR:

  • ip is more powerful and flexible
  • ifconfig is simpler and familiar (but outdated)

 

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top