Linux Commands & Shell Skills
ip: The Interface Command That Replaced ifconfig
The iproute2 suite (ip, ss, and friends) replaced net-tools years ago, and half the internet is still teaching the old commands. ip sees modern reality: multiple routing tables, policy rules, namespaces, and links that hold addresses rather than being made of them. ifconfig limps along through a compatibility layer on some distributions; in scripts and muscle memory, treat it as deprecated decoration.
Key points
- Start from compact truth: ip -br addr and ip -br link print every interface and its addresses in one screen; ip -br -4 addr scoped is the everyday inventory glance.
- Runtime changes are temporary by design: ip addr add 10.0.0.5/24 dev eth0 adds, ip addr del removes, and none of it survives reboot; netplan, ifcfg files, or NetworkManager own durable state.
- Routing is where ip shines: ip route show for the table, ip route add default via 10.0.0.1, and the underrated ip route get 1.1.1.1, which answers exactly which interface and gateway a packet would take.
- ip neigh replaced arp -a, and the two-vs-one duplicate you sometimes see is either a working VRRP pair or an IP that moved to a new MAC; the diff is whether it was planned.
- Policy routing comes from the same tool: ip rule and ip route show table all expose the multi-gateway, per-source routing that no older tool ever told you about honestly.
- Interface state changes are live and local: ip link set eth0 down answers instantly, from your SSH session, over that interface; anything risky gets a second session, another interface, or the console.
- For debugging, diff reality, not memory: ip route show table all before and after a change tells the truth about what moved (and flush with ip route flush cache when policy experiments misbehave).
- Learn the siblings once: ss -tulpn replaces netstat, ip netns creates test sandboxes, and together they cover net-tools' whole repertoire plus the parts net-tools never could see.
Field note
Bringing down the interface I was SSH'd through ended the session mid-edit and taught me the lesson everyone warns you about. Any ip link change now happens from a console or at least a second interface.
Frequently asked questions
Why do my ip changes vanish after a reboot?
ip commands edit runtime state only; persistence comes from the distro's network layer (netplan, NetworkManager, ifcfg). A route that exists only in the running kernel is a demonstration, not a deployment.
Should I really worry about ip link set down over SSH?
Yes: bringing down the interface your session travels over is the honored method of locking yourself out mid-change. Do link surgery from a console, a second interface, or at minimum an already-open second session.
How do I read routing output quickly?
default via <gateway> dev <iface> is the whole story, metric breaks ties, scope link means on-link delivery, and an absent default line usually means DHCP broke rather than routing magic.
What actually replaced netstat?
ss: one tool across modern distros, ss -tulpn for listening sockets with process names, ss -s for summary numbers; if a doc still says netstat -tapen, it is teaching 2009.
How Kinetikatech helps with linux commands & shell skills
This is what we do every day: The commands and scripting habits that decide whether an administrator operates a server or fights it: search, transform, transfer, and supervise text and processes with the tools that live in every base install. Our Linux Server Security and Server Management service covers it end to end, assessment, implementation, 24/7 monitoring, and emergency response within 30 minutes.