Linux ip Command: Inspect and Configure Network Interfaces and Routes
ip is an iproute2 tool for checking or changing network interfaces, IP addresses, routing, and neighbor tables. It is not a command to check just a single address, but manages Linux network states by dividing them into multiple objects.
What is the ip command?
The basic format is ip [options] object command. link deals with the interface itself, address with the assigned IP address, route with the next path of packets, and neigh with neighbor information on the same link. Queries usually end with show, but add/del/set actually change the network.
Basic syntax
ip [options] object command [arguments]
The installed implementations and options may vary depending on the distribution. Check the current system's description with man ip.
Examples
Checking interfaces and addresses
You can see the device's UP status along with assigned IPv4 and IPv6 addresses.
ip -br address show
Checking the routing table
You can check the default route and the exit interface for each destination network.
ip route show
Calculate the path to a specific destination
Check the kernel's choice of which interface and source address to use.
ip route get 192.0.2.1
How to read interface status and addresses
ip -brief address shows the name, status, and assigned address of each interface in one line. In the following example, 192.0.2.10 is a documentation address and not the value used in actual settings.
ip -brief address
Example output:
lo UNKNOWN 127.0.0.1/8 ::1/128 eth0 UP 192.0.2.10/24
UP is the status of the interface, and /24 is the IPv4 network prefix length. Even if there is an address, it does not guarantee an internet connection, so use ip route to check routes and ping or DNS lookup to verify connectivity to the destination separately. During remote access, changing addresses or routes may disconnect the session.
To narrow a network problem, check the address with ip -brief address, the default route with ip route, and name resolution with resolvectl or a DNS tool. A valid-looking address alone does not provide outside connectivity if the default gateway is missing.
Main Options and Format
| Options/Format | Description |
|---|---|
link show |
Display network interfaces and link status. |
address show |
Display the IP addresses set on the interfaces. |
route show |
Display the routing table. |
neigh show |
Display ARP and NDP neighbor entries. |
-br |
Output supported lookup commands in a simple table format. |
-4 / -6 |
Limit to IPv4 or IPv6 entries. |
Precautions when using
If you run ip link set ... down or change the address/default route on a remote server, the connection may be immediately lost. Record the current settings and prepare console access and a recovery plan. Changes made directly with ip may be reset by network management services or lost on reboot, so for permanent settings, follow the distribution's management method.
Frequently Asked Questions
What is the difference between ip address and ip route?
The ip address shows the addresses on interfaces, and ip route shows the routes and next hops for sending packets to destinations.
Official Documentation
The exact behavior of options and differences between implementations can be checked in the official documentation for ip.









