Ifconfig Cheatsheet

Command-line tool for configuring and displaying network interfaces on Unix systems

Updated at: March 12, 2025

Network Interface Display

The ifconfig command displays network interface configuration and status information. It shows IP addresses, MAC addresses, MTU sizes, and traffic statistics for all network interfaces on the system.

Interface Configuration

Configure network interfaces with ifconfig to set IP addresses, netmasks, MAC addresses, and other parameters. While modern systems often use the ip command, ifconfig remains relevant on many Unix-like systems for basic interface configuration.

Interface Testing

Interface testing helps diagnose network connectivity issues, monitor performance, and identify hardware problems. These commands allow you to verify connectivity, check for errors, and monitor traffic patterns on network interfaces.

Wireless Interface Management

The ifconfig utility can be used to manage wireless network interfaces on Linux systems. While many modern distributions use iw or iwconfig tools, ifconfig still provides basic wireless configuration capabilities.

Interface Aliases

Interface aliases allow you to assign multiple IP addresses to a single network interface. This is useful for hosting multiple services or websites on a single physical connection, creating virtual networks, or implementing IP-based virtual hosting.

IPv6 Configuration

IPv6 is the next-generation Internet Protocol designed to replace IPv4. The ifconfig command can be used to display and configure IPv6 addresses on network interfaces, though on modern systems, the ip command is often preferred for IPv6 management.

Troubleshooting

The ifconfig command can help diagnose and resolve network interface issues. These troubleshooting techniques help identify hardware problems, connectivity issues, and configuration errors affecting network interfaces.

Advanced Operations

Advanced operations with ifconfig allow network administrators to fine-tune network interfaces beyond basic configuration. These operations include setting interface flags, managing metrics, configuring queuing mechanisms, and other low-level network parameters.