ifconfig (interface configuration) is a Linux/Unix command used to view and configure network interfaces on a system.
It shows details like IP address, MAC address, interface status, and packet statistics.
ifconfig
ifconfig eth0
ifconfig eth0 up
ifconfig eth0 down
ifconfig eth0 192.168.1.10 netmask 255.255.255.0
ifconfig: command not found
Cause: net-tools package not installed (common in modern Linux).
Fix:
sudo yum install net-tools
sudo apt install net-tools
Cause: DHCP not assigned or interface down.
Fix:
ifconfig eth0 up
systemctl restart network
Possible causes: Wrong gateway, DNS issue, routing problem.
Check:
route -n
cat /etc/resolv.conf
ip addr, ip link