O'Reilly logo

Mac OS X Panther for Unix Geeks, Second Edition by Ernest E. Rothman, Brian Jepson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required