Where to start First steps track · 15 stages
Linux Labs

ip — addresses, interfaces and routes

cheat sheet · Ubuntu 24.04 · iproute2 https://lab.dimsanych.ru/en/wiki/ip/

Cheat sheet

  • ip -br a addresses, brief
  • ip -br l interfaces, brief
  • ip r routing table
  • ip route get 8.8.8.8 path a specific packet would take
  • ip -s link show eth0 counters and errors
  • ip neigh ARP
  • sudo ip a add 192.168.1.10/24 dev eth0 add an address temporarily
  • permanent: /etc/netplan/*.yaml + sudo netplan apply

Options

Output modifiers (-br, -s, -c, -d, -h) go right after ip and only affect how the result is printed, not which object is selected: ip -br a and ip a -br are the same. -4/-6 narrow the output to one protocol version — useful when an interface has both IPv4 and IPv6 and the extra lines get in the way.

Loading…