Interfaces & Routing

The ip command (iproute2)

ip replaces the deprecated ifconfig/route/netstat tools.

CommandShows / does
ip addr (ip a)Interface addresses
ip linkInterface state (up/down)
ip route (ip r)Routing table
ip addr add 192.168.1.5/24 dev eth0Add an address
ip link set eth0 upBring interface up
ip route add default via 192.168.1.1Set default gateway
$ ip -br addr
lo    UNKNOWN 127.0.0.1/8
eth0  UP      192.168.1.10/24
Exam tip: Changes made with ip are not persistent - they vanish on reboot. Persist them via NetworkManager (nmcli) or config files.