brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: ip -br address shows every interface and its IP on one line

Linux
~/tips/tip-ip-brief-address

ip -br address

Prints one line per network interface with its state and IP addresses.

Plain ip address prints a screen full of flags, MTUs and lifetimes for every interface. When you only want to know which interface has which address, there is a short form.

ip -br address

-br is short for -brief, and ip -br a works too. Each line shows the interface name, whether it is UP or DOWN, and its addresses, IPv4 and IPv6 together. On a server with Docker and Tailscale this makes the output readable, because the bridge and tailscale interfaces take one line each instead of twenty.

Two variants I would remember:

  • ip -br -4 address shows only IPv4 addresses.
  • ip -br link shows the same brief view of the links, with MAC addresses, which helps when you hunt a device by its hardware address.

The brief view leaves out details such as the MTU and the address lifetimes. When you need those, drop -br and read the full output.

Further reading: ip manual (man7.org)

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link