ncutil - OS X's Missing Network Configuration Utility

Posted on in System Administration

If you've ever had to administer a Mac OS X system from afar, you know how difficult it can be to manage network settings. The Network Preference Panel under System Preferences is a great tool if you have remote access to the <acronym title="Graphical User Interface">GUI</acronym>, but it's not very useful if have to use the command line. Mac OS X stores it's network configuration information in a properties list file called preferences.plist in /Library/Preferences/SystemConfiguration. Although this can be edited by hand with your favorite text editor, it's risky and not recommended.

The freySide LogoDr. Jeffrey T. Frey of the freySide (and apparently the University of Delaware) has written ncutil to overcome this OS X shortcoming.

Since you are presumably working from the command line, once you've downloaded the latest release of ncutil (version 2.x is the last to support OS X pre-10.4, by the way), installing is a simple matter of calling the installer command line utility. I'll walk you through the process here. As always, the '\$' indicates a shell prompt and should not be typed.

$ wget http://deaddog.duch.udel.edu/archive/ncutil312U_install.pkg.zip
<snip wget output>
$ unzip ncutil312U_install.pkg.zip
Archive:  ncutil312U_install.pkg.zip
<snip unzip outpu>
$ sudo installer -pkg ncutil312U_install.pkg -target "/"
Password:
installer: Package name is ncutil 3.1.2 for Mac OS X
installer: Installing onto volume mounted at /.
installer: The install was successful.
$ ncutil version
ncutil - network configuration utility
Darwin OS network configuration utility 3.1.2f
NCUtilFoundation framework version 3.1.3f

Once ncutil is installed, you can navigate the current network settings of the system by starting up ncutil and navigating the settings in a method similar to navigating a directory structure.

$ sudo ncutil
[0 ]$ ls
dr- 1     Interfaces                              Directory
drw 6     Automatic                               Location
[0 ]$

In this relatively fresh install of Mac OS X 10.4 (Tiger), you can see that we have 2 items at the root of our configuration: a directory called Interfaces and a location called Automatic. We can descend into the Interfaces directory and get a list of interfaces on the system.

[0 ]$ cd Interfaces
[1 Interfaces]$ ls
dr- 2     Bluetooth                               Interface
dr- 3     Built-in Ethernet                       Interface
dr- 4     Built-in FireWire                       Interface
dr- 5     AirPort                                 Interface
[1 Interfaces]$

That should be enough to get you started with ncutil. If you have questions or would like to see a more detailed demonstration of a particular concept or activity in ncutil, drop me a line via the email address listed on my About Slaptijack page.

Related Reading:

Slaptijack's Koding Kraken