display information about network interfaces ifconfig
display MAC addresses ifconfig | grep ether
set a new MAC address to en0 sudo ifconfig en0 ether aa:bb:cc:dd:ee:ff
display local IP addresses ifconfig | grep 'inet ' | grep -v '127.0.0.1' | cut -d' ' -f2
Display basic information: ifconfig
Set network parameters: sudo ifconfig <new_address>
Network Interface Configurator.
-
View network settings of an ethernet adapter:
ifconfig eth0
-
Display details of all interfaces, including disabled interfaces:
ifconfig -a
-
Disable eth0 interface:
ifconfig eth0 down
-
Enable eth0 interface:
ifconfig eth0 up
-
Assign IP address to eth0 interface:
ifconfig eth0 ip_address
ifconfig
ifconfig -a
ifconfig wlan0 {up|down}
ifconfig eth0 192.168.1.100 netmask 255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1