Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Linux ip command inspects and changes network configuration. Start with show commands to inspect links, addresses, routes, and neighbours; use commands such as add, del, or set only when you intend to change live kernel state. The examples below use documentation-only IP addresses and an illustrative interface name, so replace them with values from your system.

How the ip command is organized

The general form is ip [ OPTIONS ] OBJECT { COMMAND | help }. The object identifies what you are working with—such as a link, address, route, or neighbour—and the command specifies an action, commonly to display or modify it. Object names can be abbreviated; for example, addr is a shorthand for address. This guide uses full names where practical.

The examples follow the iproute2 manual pages, which report upstream repository content retrieved on August 4, 2026, with the most recent commit found dated July 28, 2026. For details that depend on your installed version, check ip help and your distribution’s documentation. See the ip(8) manual.

Start by inspecting the network

These read-only commands show different parts of the current network configuration:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • ip link show displays network devices and link state.
  • ip addr show displays protocol addresses assigned to devices.
  • ip route show displays route entries.
  • ip neigh show displays the current neighbour table.

To focus on one device, run ip addr show dev eth0, replacing eth0 with the interface name used by your system. The address manual documents filtering displayed addresses by device. Interface names vary; do not assume that every Linux host uses eth0. See the ip-address(8) manual.

Show IPv4 and IPv6 addresses

Use ip addr show to display addresses from both protocol families. Add -4 or -6 to filter the output:

ip addr show
ip -4 addr show
ip -6 addr show

An address belongs to a network device, and its prefix indicates the network size. Address scope can be global, link-local to a device, or host-local. Consult the address manual when interpreting address details.

Add or remove an address on a live interface

The address object supports add and del. These examples use 192.0.2.10/24, an address in the documentation-only 192.0.2.0/24 range; it is not an address to copy as a real assignment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo ip addr add 192.0.2.10/24 dev eth0
sudo ip addr del 192.0.2.10/24 dev eth0

Before running either command, confirm the actual interface and address prefix required on your network. These commands change active kernel configuration; they are not, by themselves, a persistent setup recipe. How to make a configuration survive a reboot depends on the distribution and the network manager in use.

Inspect or change link state

Show available links and their state with:

ip link show

To bring a device up or down, use ip link set:

sudo ip link set dev eth0 up
sudo ip link set dev eth0 down

Taking a link down can cut off network access, including a remote session connected through that device. Check the device name and make sure you have a recovery path before changing its state. The ip(8) manual documents the link-state form.

Display routes and check the kernel’s chosen path

Use ip route show to display route entries. To ask the kernel how it would route traffic to a particular destination, use ip route get:

ip route show
ip route get 203.0.113.10

The second command retrieves one route and prints it as the kernel sees it. The destination shown is in the documentation-only 203.0.113.0/24 range; substitute the destination you need to check. This lookup can help distinguish the path the kernel selects from what you might infer by scanning route entries. See the ip-route(8) manual.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add a default route only with verified values

A default route provides a path for destinations that do not match a more specific route. The documented command form is:

sudo ip route add default via 192.0.2.1 dev eth0

The gateway and interface above are illustrative. Confirm the real gateway and the device through which it is reachable before applying the command. A default-route change can disrupt traffic, especially remote administration.

Do not use ip route show cached to diagnose an IPv4 route cache on Linux kernel 3.6 or later: the IPv4 routing cache was removed starting with kernel 3.6, so that command will not show cached entries on those kernels. The behavior is documented in ip-route(8).

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Inspect neighbour and ARP information

The neighbour object manages mappings between protocol addresses and link-layer addresses for hosts sharing a link. The IPv4 neighbour table is also called the ARP table. To display it or look up a particular destination on a device:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ip neigh show
ip neigh get 192.0.2.20 dev eth0

The lookup needs the destination and the selected device; replace both illustrative values as appropriate. The ip-neighbour(8) manual warns that manually deleting or altering kernel-created noarp entries can produce unpredictable behavior, so treat such entries as something to understand rather than routine cleanup targets.

Choose commands by object and impact

Object Read-only inspection Example change or lookup What it concerns
Link ip link show ip link set dev eth0 up Network device and its link state
Address ip addr show ip addr add 192.0.2.10/24 dev eth0 Protocol addresses assigned to a device
Route ip route show ip route get 203.0.113.10 Route entries or the kernel’s path to a destination
Neighbour ip neigh show ip neigh get 192.0.2.20 dev eth0 Protocol-to-link-layer address mappings on a shared link

Commands with show inspect current state. Commands such as add, del, and set change it; get requests a particular lookup. Use inspection first, and make live changes only after checking their effect on connectivity and the host’s network manager.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.