KIM COMPUTER


ifconfig (Interface Configuration)

The ifconfig command is a system administration utility in Unix-like operating systems to configure, control, and query TCP/IP network interface parameters. It is the primary tool for checking your local IP address and network hardware status.


1. Basic Usage

ifconfig [interface] [options]

2. Key Information in Output

Label Description
inet The IPv4 address assigned to the interface.
netmask The subnet mask used to define the network boundaries.
ether The MAC address (Physical address) of the hardware.
UP/RUNNING Indicates that the network interface is active and functioning.

3. Practical Examples

① Displaying all active interfaces

ifconfig

② Viewing a specific interface (e.g., wlan0 for Wi-Fi)

ifconfig wlan0

③ Enabling or Disabling an interface

sudo ifconfig eth0 up
sudo ifconfig eth0 down

4. [Tip] ifconfig vs ip addr

While ifconfig is a classic tool, it is being deprecated in favor of the more powerful ip command from the iproute2 package. If ifconfig is not found, try:

ip addr show