A comprehensive reference for transitioning from legacy networking commands to modern alternatives.
| Category | Modern Command (ip/ss) | Legacy Command (ifconfig/netstat) | Description |
|---|---|---|---|
| Addressing | ip addr show | ifconfig | Show all IP addresses |
| Interfaces | ip link show | ifconfig -a | Show interface status |
| Routing | ip route show | route -n | Show routing table |
| ARP/Neighbors | ip neigh show | arp -n | Show ARP cache |
| Ports/Connections | ss -tuln | netstat -tulnp | Show listening ports |
| Statistics | ss -s | netstat -s | Socket statistics |
| Bring up interface | ip link set eth0 up | ifconfig eth0 up | Enable interface |
| Add IP address | ip addr add 192.168.1.10/24 dev eth0 | ifconfig eth0 add 192.168.1.10 | Assign IP |
| Add route | ip route add 192.168.2.0/24 via 192.168.1.1 | route add -net 192.168.2.0/24 gw 192.168.1.1 | Add network route |
📌 Pro tip: Use ip -br addr for a compact, script-friendly output.