Operations 6 min read

Master Linux Network Management with the ip Command: View, Enable, and Configure Interfaces

This guide explains how to replace the deprecated ifconfig tool with the powerful ip command, covering how to display interface details, enable or disable interfaces, assign and remove temporary IP addresses, inspect routing tables, view ARP entries, and check network statistics on modern Linux distributions.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master Linux Network Management with the ip Command: View, Enable, and Configure Interfaces

Why the ip Command Replaces ifconfig

Older Linux versions used ifconfig to show IP addresses and other network details, but the tool is no longer maintained and has been deprecated in recent releases. The ip utility provides the same functionality plus many advanced features for managing network interfaces, routes, and statistics.

Viewing Network Interface Information

To list all interfaces with their IP addresses, subnet masks, and status, run: ip addr show For a specific interface, such as ens33, use:

ip addr show ens33

Enabling and Disabling an Interface

Use ip link set with up or down to change the operational state of an interface.

sudo ip link set ens33 down   # disable
sudo ip link set ens33 up     # enable

Assigning a Temporary IP Address

To add an address to an interface without modifying configuration files, execute: sudo ip addr add 192.168.43.175/24 dev ens33 The address persists only until the interface is restarted or the system reboots.

Removing an Assigned IP Address

Delete a previously added address with:

sudo ip addr del 192.168.43.175/24 dev ens33

Inspecting Routing and Default Gateway

Show the full routing table, including the default gateway, with: ip route show To query the route that would be used for a specific destination IP, run:

ip route get 192.168.43.2

Viewing ARP Cache Entries

List the Address Resolution Protocol (ARP) table, which maps IP addresses to MAC addresses, using:

ip neigh

Checking Network Statistics

Obtain per‑interface byte and packet counters, as well as error statistics, with:

ip -s link

Conclusion

The ip suite replaces the legacy ifconfig tool and offers a comprehensive set of commands for querying and manipulating network settings on Linux. For options not covered here, consult the manual page with man ip.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Networkroutingip command
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.