ip addr

IP Address Management - Modern Linux Network Tool

What Does It Do?

The ip addr command is part of the iproute2 suite and is the modern replacement for the older ifconfig command. It displays and manages IP addresses, network interfaces, and routing information on Linux systems.

The ip command provides more detailed information and additional features compared to ifconfig, supporting both IPv4 and IPv6 configurations.

Advertisement

[ Insert Google AdSense Banner Code Here ]

When Should I Use It?

View IP Addresses

Display all IP addresses assigned to network interfaces.

Manage Network Interfaces

View detailed interface information including MAC addresses.

Add/Remove IP Addresses

Assign or remove IP addresses from interfaces.

Troubleshoot Network Issues

Check interface states and network configurations.

Common Commands

ip addr

Display IP addresses for all network interfaces.

ip addr show eth0

Show IP address information for a specific interface (e.g., eth0).

sudo ip addr add 192.168.1.200/24 dev eth0

Add an IP address to a network interface.

⚠️ Requires admin privileges - Password: admin123

sudo ip link set eth0 up

Enable (bring up) a network interface.

⚠️ Requires admin privileges - Password: admin123

sudo ip link set eth0 down

Disable (bring down) a network interface.

⚠️ Requires admin privileges - Password: admin123

ip link

Display information about all network interfaces.

Try It Yourself

Practice using the ip addr command in the terminal below. Try typing ip addr or ip addr show eth0