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.
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 ens33Enabling 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 # enableAssigning 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 ens33Inspecting 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.2Viewing ARP Cache Entries
List the Address Resolution Protocol (ARP) table, which maps IP addresses to MAC addresses, using:
ip neighChecking Network Statistics
Obtain per‑interface byte and packet counters, as well as error statistics, with:
ip -s linkConclusion
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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
