An IP (Internet Protocol) address uniquely identifies a device on a network. In Linux, IP addresses are used for internet access, local communication, and configuring services.
ip is the modern replacement for ifconfig, used for inspecting and manipulating network interfaces, IP addresses, routes, and device status.
ip addr
ip link
ip routeifconfig is part of the deprecated net-tools package. To install:
sudo apt install net-tools # Debian / Ubuntu
sudo yum install net-tools # CentOS / RHEL| Feature | ifconfig | ip |
|---|---|---|
| Show IP address | | |
| Modern & extensible | ❌ | ✅ |
| Interface control | | |
| View routing table | | |
ip addr showip -4 addr showip -6 addr showip route showip link showQuickly show current IP(s):
hostname -IManually assign IPv4 address to eth0:
sudo ip addr add 192.168.1.10/24 dev eth0
sudo ip link set eth0 upMastering IP configuration and the ip command in Linux is foundational for networking. Whether viewing interfaces, configuring addresses, or inspecting routing behavior, these tools help users maintain control over system connectivity in both local and enterprise environments.