Look up Linux ip (iproute2) commands quickly
The ip command from iproute2 is the modern way to inspect and configure Linux
networking, replacing ifconfig, route and arp. This reference groups its
common subcommands under the address, route, link, neighbour and rule objects,
showing options and the legacy command each replaces. It runs entirely in your
browser.
How it works
The general form is ip [OPTIONS] OBJECT { COMMAND }. The object is addr,
route, link, neigh or rule, and the command is usually show, add,
del or set. Read operations work as any user; modifying state needs root:
ip addr show dev eth0
sudo ip addr add 10.0.0.5/24 dev eth0
sudo ip route add default via 10.0.0.1 dev eth0
sudo ip link set dev eth0 mtu 1400 up
Tips and examples
- Abbreviations work:
ip a,ip randip lexpand toip addr,ip routeandip link, which is handy interactively. ip -br addrprints a brief one-line-per-interface summary; add-cfor colour and-jfor JSON output you can pipe tojq.ip route get 1.1.1.1shows exactly which route and source address the kernel would use to reach a destination — invaluable for debugging.- Changes made with
ipare runtime-only; persist them in netplan, NetworkManager or systemd-networkd so they survive a reboot.