Use ifconfig command to list all currently configured interfaces on system
Listing Linux Configuration Interfaces
How do I use the ifconfig command to list all currently configured interfaces on the system?
Now that you have seen which network interfaces are available on your system, you can learn how to configure them.
To configure a TCP/IP network interface, you must program it with its IP address and netmask.
The command for working with network interfaces under UNIX is ifconfig.
The ifconfig command has three purposes: listing configured interfaces, bringing interfaces up and down, and setting the IP address and netmask.
Listing configured interfaces
If run with no arguments, ifconfig will list all currently configured interfaces on the system and basic status information about each interface.
The following mouse over below examines output from a Linux machine, which shows a configured PPP interface.
The Solaris version of this command is slightly less informative, and requires the option -a.
The following example contains the list config
In this example, we see two configured interfaces. The first, lo0, is the loopback address. We can tell from its inet address of 127.0.0.1 and from the LOOPBACK flag shown.
The second, hme0, is an ethernet card with IP address 184.108.40.206, netmask ffffff00=255.255.255.0, and MTU 1500.
(Notice that in this example, Solaris ifconfig does not report the ethernet address of hme0. Some versions of Solaris ifconfig, however, will list ethernet addresses, so your listing may differ slightly.)
Bringing interfaces up and down
The ifconfig command may be used to activate and deactivate a network interface.
For example, to toggle the state of the eth0 device, use:
host# /sbin/ifconfig eth0 down
host# /sbin/ifconfig eth0 up
Note that root permissions are necessary to bring an interface up or down.