ifconfig

ifconfig - configure a network interface.


Display all active interfaces information:

ifconfig

Display information of all network interfaces (active or inactive):

ifconfig -a

Display information of a specific interface:

ifconfig eth0

Enable a specific interface:

ifconfig eth1 up

Disable a specific interface:

ifconfig eth1 down

Assign a ip address and netmask to a network interface:

ifconfig eth0 192.168.0.1 netmask 255.255.255.224

Change the MTU for a network interface:

ifconfig eth0 mtu 1300

Add new alias to network interface:

ifconfig eth0:0 192.168.0.2

Disable an alias of network interface:

ifconfig eth0:0 down

Change the MAC address of network interface:

ifconfig eth0 hw ether AB:CD:EF:01:02:03