While the command prompt is less central in modern Linux desktop environments, understanding core networking tools remains essential for system administration, security audits, and troubleshooting. The equivalent utility for checking network configuration in this ecosystem is not ipconfig, but a more granular set of commands built around the IProute2 suite. For professionals transitioning from a Windows background, the immediate question is often, what is ipconfig in linux, and how does one achieve the same results.
Understanding the Windows Heritage
The name "ipconfig" is intrinsically linked to Microsoft Windows, where it serves as a straightforward utility to display all current TCP/IP network configuration values and refresh Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. It provides a single, concise output of IP address, subnet mask, and default gateway. In the Linux world, there is no single command that mirrors this exact behavior because the philosophy often leans towards modularity and combining smaller tools. The question, what is ipconfig in linux, is technically answered by a combination of commands, although modern distributions often provide a convenient alias.
The Modern Equivalent: The `ip` Command
The most powerful and current tool for network configuration in Linux is the ip command from the iproute2 package. It has largely superseded the older ifconfig utility. To simply view network interface information similar to a basic ipconfig output, the command is ip addr or its longer form ip address . This command lists all network interfaces, their current state (UP or DOWN), their link-layer (MAC) addresses, and their assigned IP addresses, including IPv6. It provides a detailed output that is more comprehensive than the Windows counterpart.
Common Command Aliases
Many Linux distributions, particularly those designed for beginners or designed to be user-friendly, create an alias to ease the transition for Windows users. If you type ipconfig in a terminal and it works, it is likely a shell alias. This alias is usually defined in system configuration files like /etc/bash.bashrc or user-specific files like ~/.bashrc . The alias typically points to a more native command, such as ip addr or hostname -I , to provide a familiar interface without sacrificing the underlying power of Linux networking tools.
Alternative Utilities for Specific Tasks
Depending on the specific information required, other commands serve the role of targeted ipconfig operations. For a quick check of the machine's own IP address without detailed interface information, hostname -I (note the capital "I") is extremely efficient, outputting only the primary IP address. To see the routing table, which in Windows is viewed via route print or netstat -r , the command is ip route . For displaying network statistics, such as packet counts and errors, netstat -i or the newer ip -s link provides that data.
Configuration and Management
Beyond just viewing information, the ip command is a primary tool for active network management. You can use ip link set eth0 up to activate an interface or ip addr add 192.168.1.100/24 dev eth0 to manually assign an IP address. While Windows users might rely on the GUI for DHCP configuration, Linux servers often require manual editing of network configuration files located in /etc/netplan/ or /etc/network/interfaces . Understanding the underlying commands is crucial when graphical interfaces are unavailable, such as when troubleshooting a server over SSH or when the display manager fails to start.