Problem Statement
Which command displays network interface configuration in Linux?
Explanation
The ifconfig command (interface configuration) displays network interface information including IP addresses, MAC addresses, netmasks, and interface status. However, ifconfig is deprecated in favor of the ip command from the iproute2 package. Use ip addr or ip a to show interface configuration with more detailed information.
Both commands show interface names (eth0, ens33, wlan0), IP addresses (IPv4 and IPv6), MAC addresses, MTU (Maximum Transmission Unit), and interface state (UP/DOWN). Ip addr provides additional information like scope (global, link, host) and is more powerful with consistent syntax across different operations.
Example output shows lo (loopback) interface at 127.0.0.1, and physical interfaces with assigned IP addresses. Understanding interface configuration is fundamental for network troubleshooting, configuring static IPs, and diagnosing connectivity issues. Modern systems prefer ip command, but ifconfig is still widely used and understood.
