ifconfig
ifconfigis a command in Unix-like operating systems like Linux[1], FreeBSD, OpenBSD, macOS for Ethernet network interface configuration.
In macOS, the ifconfig command functions as a wrapper to the IPConfiguration agent, and can control the BootP and DHCP clients from the command-line. Use of ifconfig to modify network settings in Mac OS X is discouraged, because ifconfig operates below the level of the system frameworks which help manage network configuration. To change network settings in Mac OS X from the command line, use /usr/sbin/ipconfig or /usr/sbin/networksetup.
ifconfig command is included in the net-tools package but not installed by default in RHEL since version 7[2].
Configuring an alias IP
Activities
- Show interface configuration in Linux including ip addresses:
ifconfig -aorip a - Show interface Ethernet network capabilities of your interface, such as speed, with:
mii-tool -v YOUR_INTERFACE_NAME,mii-tool -v eth0 - Show all network interfaces in Linux:[3]
- Learn about Linux Naming Schemes Hierarchy.
- Change your MAC address:
ifconfig {eth0|wlan0} hw ether CA:CA:CA:CA:CA:CA
Related commands
docker inspect CONTAINER_NAME | grep IPAddresshostname -I
See also
- Linux networking: Consistent Network Device Naming (eth, ens), DPDK, Alias IP, bonding, Wlan0,
ip[link, route],ifconfignetstatsslsofpingethtoolmii-toolarpingnmcli(RHEL)routenetworkctl,netplan,tc,networkd-dispatcher ipconfigWindows command- macOS:
networksetup,ifconfig,ipconfig [ getifaddr ],scutil - bonding
References
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.
Advertising: