Reading Time: 2 minutes, 0 secs

Terminal and ifconfig with OS X

Using terminal to troubleshoot-resolve connection issues on Mac OS X.

Instructions to use and launch the Terminal Utility to use ifconfig


Instructions enabling the root account in order to use the Terminal Utility to use ifconfig

CAUTION: using the root account may result in data loss, OS corruption, and issues that will require a full reformat of the drive. Disable ROOT after this process is complete. This is intended for experienced users or technicians.

1. Turn on the root user account. If you already know the password for the root user, click here.
Open the Directory Utility: In Snow Leopard: Select the hard drive>System>Library>Core Services and open Directory Utility. (Please click on the image to see full image)

Note: If the Directory Utility has been used before, it may not be found in the Library, but will be found in Applications>Utility>Directory Utility

Open Directory Utility

2. Click the lock to enable changes if necessary; then go to Edit> Enable Root User.
Enable root user

3. Provide a password for the root user and click “OK”.

Enter a new root user password

4. Open Network Utility to determine the network interface of interest: Applications> Utilities > Network Utility
Open Network Utility

5. Click on the dropdown menu and you will see the list of available interfaces. Take note of the one you are interested in. Ethernet is for a wired connection, Airport or Wifi is the wireless connection. In our example, we will troubleshoot the airport (Wi-Fi) connection, en1.

Note the network interface of interest

6. Open the terminal. Applications > Utilities > Terminal

7. Log in as the root user. Type “su” and hit Enter, then type in the password and hit Enter. The password will not show as it is typed.
Type "su" and Enter, then password and enter


8. Type “ifconfig ” to get the information on that interface. In our case, is replaced with “en1”. Information about that interface will be listed. In this case, the IP address is a valid UVM IP address.

9. Sometimes you may need to refresh the connection to resolve connection failures. To do this type in “ifconfig down” and hit Enter.
Refresh connection: ifconfig down

10. To reconnect to the network, type “ifconfig up” and hit Enter.

Reconnect: ifconfig up

11. If you want to see the list of available interfaces, type “ifconfig”. You will be able to get the┬áMAC address as well as the status of the network interface. You will need to take note of the interface name to look it up in the Network Utility.
Type: "ifconfig" to show full list of network interfaces

updated 7-29-15 sbeaucha

1 Like