Linux ip Command Reference

ip addr, ip route, ip link, ip rule subcommands with options and examples.

Reference for the Linux iproute2 ip command — address, route, link, neighbour and rule objects — with their common subcommands, options and equivalent legacy net-tools commands.

What replaced ifconfig and route?

The iproute2 ip command replaced the deprecated net-tools ifconfig, route, arp and netstat. ip addr shows interfaces, ip route shows the routing table, and ip neigh shows the ARP/neighbour cache, all with consistent syntax.

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 r and ip l expand to ip addr, ip route and ip link, which is handy interactively.
  • ip -br addr prints a brief one-line-per-interface summary; add -c for colour and -j for JSON output you can pipe to jq.
  • ip route get 1.1.1.1 shows exactly which route and source address the kernel would use to reach a destination — invaluable for debugging.
  • Changes made with ip are runtime-only; persist them in netplan, NetworkManager or systemd-networkd so they survive a reboot.