Commands · Command
CommandLinuxmacOS
ifconfig
ifconfig [interface] [options]Displays or configures network interface settings — IP address, netmask, and interface status.
// FLAGS
(no args)show all interfacesup / downenable or disable an interface-ashow all interfaces including inactive ones (on some systems)// EXAMPLE
ifconfig eth0 — shows eth0's IP address, MAC address, and traffic statistics.
// GOTCHA
ifconfig is deprecated on modern Linux in favor of ip (part of iproute2) and isn't installed by default on many recent distros — it's still common on macOS and older systems, but shouldn't be assumed present everywhere.
// RELATED COMMANDS