System Configuration

Although you can perform most system configuration through the System Preferences program, the scutil and defaults commands let you poke around under the hood. You can get even further under the hood with the nvram command (perhaps further than most people would need or want to get).

scutil

Mac OS X stores network configuration in a database called the dynamic store. You can get at this database using scutil, the system configuration utility. Before you can do anything, you must connect to the configuration daemon (configd ) with the open command (close the session with the close command, and exit scutil with quit):

Chez-Jepstone:~ bjepson$ sudo scutil
Password: ********
> open

List the contents (a collection of keys) of the configuration database with the list command. The following shows abbreviated output from this command:

> list
  subKey [0] = DirectoryService:PID
  subKey [1] = Plugin:IPConfiguration
  subKey [2] = Setup:
  subKey [3] = Setup:/
  subKey [4] = Setup:/Network/Global/IPv4
  subKey [5] = Setup:/Network/HostNames
  subKey [6] = Setup:/Network/Service/0
  subKey [7] = Setup:/Network/Service/0/Ethernet
  subKey [8] = Setup:/Network/Service/0/IPv4
  subKey [9] = Setup:/Network/Service/0/IPv6
  subKey [10] = Setup:/Network/Service/0/Interface
  subKey [11] = Setup:/Network/Service/0/Proxies

You can show the contents of a key with the show command. The contents of a key are stored as a dictionary (key/value pairs). For example, here are the default proxy settings for ...

Get Mac OS X Panther for Unix Geeks, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.