ifconfig

Configure a network interface.

Syntax: ifconfig [option] [interface]

Example:

  1. Using ifconfig to view all the newtork interfaces.

    $ ifconfig
    eth0: flags=64<RUNNING>  mtu 1500
            inet 169.254.25.13  netmask 255.255.0.0
            inet6 fe80::4928:c109:790e:190d  prefixlen 64  scopeid 0xfd<compat,link,site,host>
            ether 30:e1:71:9a:51:e1  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    ....
    
  2. Using ifconfig to enable (up) or disable (down) a network interface.

    $ ifconfig etho0 down
    $ ifconfig eth0 up