Linux IP Commands (ip / ss / netstat — Old vs New)

Updated: 2026-05-30

The classic ifconfig and netstat belong to net-tools, which is deprecated or not installed on many distributions. The modern standard is iproute2 (ip and ss).

Mapping Table

Task Old (net-tools) New (iproute2)
Show addresses ifconfig ip addr (ip a)
Bring interface up ifconfig eth0 up ip link set eth0 up
Show routes route -n ip route (ip r)
Show ARP/neighbors arp -a ip neigh
Sockets / ports netstat -tunlp ss -tunlp

Common Examples

# All addresses (IPv4/IPv6)
ip addr show

# Default gateway
ip route | grep default

# Listening TCP ports with process
ss -tlnp

Find Your Public IP from the Shell

curl -s https://show-ip-addr.com/api/myip
# or
curl ifconfig.me

Sources