defaults

From Mac Guides

Jump to: navigation, search

defaults is a Terminal command used to modify Mac OS X plist files. This has the ability to expose greater control over an application than found in it's Preferences window. Generally, the application should not be running, as the file may be in use.

Examples

To tell iTunes that the link arrow should go to the library, versus the iTunes Music Store:

  defaults write com.apple.iTunes invertStoreLinks -bool YES

To create a new plist with one key-value pair:

  defaults write ~/Desktop/TestFile foo bar

Man Page Excerpt

Defaults allows users to read, write, and delete Mac OS X user defaults from a command-line shell. Mac OS X applications and other programs use the defaults system to record user preferences and other information that must be maintained when the applications aren't running (such as default font for new documents, or the position of an Info panel). Much of this information is accessible through an application's Preferences panel, but some of it isn't, such as the position of the Info panel. You can access this information with defaults