Name

defaults

Synopsis

defaults [host] subcommand domain [option] [key]
defaults [-currentHost | -host hostname ] read [domain [key]]
defaults [-currentHost | -host hostname ] read-type domain key 
defaults [-currentHost | -host hostname ] write domain { 'plist' | domain key ' value ' }
defaults [-currentHost | -host hostname ] rename domain old_key new_key 
defaults [-currentHost | -host hostname ] delete [ domain [ key ]]
defaults [-currentHost | -host hostname ] { domains | find word | help }

Used to access Mac OS X’s user defaults database to read, write (set or change), and delete system and application preferences.

The defaults command allows users and administrators to read, write, and delete Mac OS X user defaults from a command-line shell. An application’s defaults belong to a domain, which typically correspond to individual applications; however, they can apply to system settings made via the System Preferences panels. Each domain has a dictionary of keys and values representing its defaults. Keys are always strings, but values can be complex data structures comprising arrays, dictionaries, strings, and binary data. These data structures are stored as XML property lists.

Though all applications, system services, and other programs have their own domains, they also share a domain named NSGlobalDomain. If a default isn’t specified in the application’s domain but is specified in NSGlobalDomain, the application uses the value in that domain.

Host

-currentHost

Restricts the actions of ...

Get Mac OS X Panther in a Nutshell, 2nd 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.