ifconfig
Configure and display network interface parameters (legacy, prefer ip command).
Synopsis
ifconfig [INTERFACE] [OPTIONS]
Examples
ifconfig
ifconfig -a
ifconfig eth0
sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0
Common options
| Flag | Description |
|---|---|
| up | Activate interface |
| down | Deactivate interface |
| netmask | Set subnet mask |
| -a | Display all interfaces including down ones |
About ifconfig
The `ifconfig` command configure and display network interface parameters (legacy, prefer ip command). Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.
Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 4 commonly used flags shown above, though the full set of options is available in the man page (`man ifconfig`).
The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Network Commands
Other commands in the Network category