Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Name

defaults

Synopsis

defaults [-currentHost | -host name] command
                  

Modifies the defaults system. When you customize your Mac using the System Preferences, all of those changes and settings are stored in the defaults system. Everything that you’ve done to make your Mac your own is stored as XML data in the form of a property list (or plist). This property list is, in turn, stored in ~/Library/Preferences.

Every time you change one of those settings, that particular property list is updated. For the initiated, there are two other ways to alter the property lists. The first is by using the Property List Editor application (/Developer/Applications) and the other is by using the defaults command in the Terminal. Whether you use System Preferences, Property List Editor, or the defaults command, any changes you make affect the current user.

Options

-currentHost

Performs operations on the local machine.

-host name

Performs operations on the specified host.

Commands

read

Prints out all of your current settings.

read domain

Prints out your settings for the specified domain, such as com.apple.dock.

read domain key

Prints out the value of the specified key. For example, to see the current Dock orientation, use:

defaults read com.apple.dock orientation
read-type domain key

Prints out the data type of the specified key. For example, defaults read-type com.apple.dock orientation tells you that the type of the orientation key is string.

write domain key value

Writes a value to the specified key. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata