ip command
Show and change IP addresses, routes and network interfaces.
- Networking
- Package iproute2
- 7 options · 8 examples
Syntax
ip [options] object commandProvided by the iproute2 package. Run man ip for the full manual.
Common options
| Option | What it does |
|---|---|
a / addr | Addresses |
link | Interfaces |
r / route | Routing table |
n / neigh | ARP / neighbour table |
-br | Brief output |
-4 / -6 | Only IPv4 or IPv6 |
-c | Colour output |
Examples
Show all IP addresses
ip aBrief list of interfaces and addresses
ip -br aShow the routing table
ip rDefault gateway
ip route show defaultAdd an address
sudo ip addr add 192.0.2.50/24 dev eth0Bring an interface up
sudo ip link set eth0 upShow the ARP table
ip neighWhich route a packet takes
ip route get 8.8.8.8
No example matches. Check the options table or search the guides.
Tips
ipreplaces the oldifconfigandroutecommands. Changes made with it are lost on reboot; use Netplan or NetworkManager to keep them.
ip guides
- How to Check IP Address on Ubuntu 26.04 & 24.04 Networking · Updated Nov 2026
- How to Check IP Address on Fedora Desktop Networking · Updated Apr 2025
- How to Check IP Address on CentOS 8 Networking · Updated Apr 2025
- How to Check IP Address on Linux Command Line Linux Commands · Updated Apr 2025
- ip Command in Linux (Manage Networking) Linux Commands · Updated Apr 2025
- How to Check IP Address on Ubuntu 20.04 (Desktop) Networking · Updated Apr 2025
