Managing Network Interfaces from the Command Line: ifconfig
You are already familiar with managing your network interfaces through the Network System Preferences pane, but if you need to, you can also manage your network interfaces from the command line, using the ifconfig utility.
Viewing Current Network Status
If you have ever changed your network location, and then found yourself unable to make a network connection, a convenient way to check your current network status is to use the ifconfig command. The ifconfig command displays and sets interface information on your system. The following is an example of running ifconfig -a, which lists all the interfaces on your machine:
brezup:sage sage $ ifconfig -a lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> ...