# Defaults (software)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Defaults_(software)
> Markdown URL: https://mediated.wiki/source/Defaults_(software).md
> Source: https://en.wikipedia.org/wiki/Defaults_(software)
> Source revision: 1353624080
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Not to be confused with the generic computer science concept of [defaults](/source/Default_(computer_science)).

Command-line utility

The topic of this article may not meet Wikipedia's general notability guideline. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged, redirected, or deleted. Find sources: "Defaults" software – news · newspapers · books · scholar · JSTOR (December 2016) (Learn how and when to remove this message)

This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources. Find sources: "Defaults" software – news · newspapers · books · scholar · JSTOR (December 2016) (Learn how and when to remove this message)

**defaults** is a [command line](/source/Command-line_interface) utility that manipulates [plist](/source/Property_list) files. Introduced in 1998 [OPENSTEP](/source/OPENSTEP), *defaults* is found in the system's descendants [macOS](/source/MacOS) and [GNUstep](/source/GNUstep).[1][2]

The name "defaults" derives from OpenStep's name for [user preferences](/source/Computer_configuration), *Defaults*, or *NSUserDefaults* in [Foundation Kit](/source/Foundation_Kit). Each application had its own defaults plist ("domain"), under [~](/source/Home_directory)/Defaults for the user configuration and [/](/source/Root_directory)Defaults for the system configuration. The lookup system also supports a NSGlobalDomain.plist, where defaults written there will be seen by all applications.[2][3] In [macOS](/source/MacOS), the Defaults part of the path is replaced by the more intuitive Library/Preferences. *defaults* accesses the plists based on the domain given.[2]

*defaults* is also able to read and write any plist specified with a path,[1] although Apple plans to phase out this utility in a future version.[2][4]

## Usage

Common uses of defaults:

$ defaults read DOMAIN # gets all
$ defaults read DOMAIN PROPERTY_NAME # gets
$ defaults write DOMAIN PROPERTY_NAME VALUE # sets
$ defaults delete DOMAIN PROPERTY_NAME # resets a property
$ defaults delete DOMAIN # resets preferences

DOMAIN should be replaced by the plist file name sans extension ('.plist'). plist files are named with [reverse domain name notation](/source/Reverse_domain_name_notation). For example:

$ defaults read com.apple.iTunes # prints all iTunes preference values

plist files store keys and values. The PROPERTY_NAME key is the name of the property to modify. For example, to remove the search field from [Safari](/source/Safari_(web_browser))'s [address bar](/source/Address_bar):

$ defaults write com.apple.Safari AddressBarIncludesGoogle 0
$ # or
$ defaults write com.apple.Safari AddressBarIncludesGoogle -bool NO # case-sensitive!

Using "1", "YES", or "TRUE" instead restores this to the default of including search.

Preferences can at times corrupt applications. To reset Address Book's preferences, either the file ~/Library/Preferences/com.apple.AddressBook.plist must be removed or the following command issued:

$ defaults delete com.apple.AddressBook

### Compound values

*defaults* prints values in the OpenStep format. It allows the VALUE to be arrays and dicts, as long as they conform to old-style plist syntax.[5]

## Settings

Some example settings configurable with defaults under macOS:

Globally-available defaults (works in NSGlobalDomain or application settings) Key OSX Version Legal Values Default Value AppleAquaColorVariant 10.8 1, 6 1 AppleHighlightColor 10.8 RGB, 3 floats range 0-1.0 "0.780400 0.815700 0.858800" AppleShowScrollBars[6] 10.8 Automatic, WhenScrolling, Always Automatic NSQuitAlwaysKeepsWindows[7] 10.8 bool false NSAutomaticWindowAnimationsEnabled[8] 10.8 bool true NSNavPanelExpandedStateForSaveMode[9] 10.8 bool false NSWindowResizeTime[8] 10.8 float:time in seconds .2 CGFontDefaultAllowsFontSmoothing[10] 10.14? boolean

SS64 documents a set of other keys that can be changed for each software (not the global domain) in macOS.[11] Other sites also document settings to be changed using *defaults*.[12] Apple does not publish a complete list of these "secret knobs", but their support site does occasionally provide *defaults* commands for user to change a certain setting, such as the creation of [.DS_Store](/source/.DS_Store).[13]

GNUstep documents its defaults more clearly, so that there is no such thing as a "hidden settings" community like there is for macOS.[3]

## References

1. ^ [***a***](#cite_ref-gdef_1-0) [***b***](#cite_ref-gdef_1-1) [defaults(1)](https://www.mankier.com/1/defaults) – [Linux](/source/Linux) General Commands [Manual](/source/Man_page) from ManKier.com

1. ^ [***a***](#cite_ref-mdef_2-0) [***b***](#cite_ref-mdef_2-1) [***c***](#cite_ref-mdef_2-2) [***d***](#cite_ref-mdef_2-3) [defaults(1)](https://keith.github.io/xcode-man-pages/defaults.1.html) – [Darwin](/source/Darwin_(operating_system)) and [macOS](/source/MacOS) General Commands [Manual](/source/Man_page)

1. ^ [***a***](#cite_ref-GlobalGNU_3-0) [***b***](#cite_ref-GlobalGNU_3-1) ["User Defaults Summary for GNUstep Libraries"](http://www.gnustep.org/resources/documentation/User/Gui/DefaultsSummary.html). *www.gnustep.org*.

1. **[^](#cite_ref-4)** ["Unofficial macOS defaults man page"](https://ss64.com/mac/defaults.html). *ss64.com*.

1. **[^](#cite_ref-5)** ["macos - modifying a Plist from command line on Mac using Defaults"](https://stackoverflow.com/questions/13740337/modifying-a-plist-from-command-line-on-mac-using-defaults). *Stack Overflow*.

1. **[^](#cite_ref-6)** grg (26 August 2013). ["macos - Enabling Scroll Bars In Mountain Lion?"](https://apple.stackexchange.com/a/100062/153976). *Ask Different*.

1. **[^](#cite_ref-7)** ["Disable 'Resume' system-wide"](https://www.defaults-write.com/disable-resume-system-wide/). *defaults-write.com*. 26 September 2012.

1. ^ [***a***](#cite_ref-ani_8-0) [***b***](#cite_ref-ani_8-1) ["10 terminal commands to speed up macOS High Sierra on your Mac"](https://www.defaults-write.com/speed-up-macos-high-sierra/). *defaults-write.com*. 11 November 2017.

1. **[^](#cite_ref-9)** Bynens, Mathias. ["mathiasbynens/dotfiles: .macos"](https://github.com/mathiasbynens/dotfiles/blob/master/.macos). *GitHub*. Retrieved 1 March 2020.

1. **[^](#cite_ref-10)** ["Issue 858861: No subpixel antialiasing under macOS Mojave"](https://bugs.chromium.org/p/chromium/issues/detail?id=858861). *bugs.chromium.org*.

1. **[^](#cite_ref-11)** ["System preference settings for macOS - macOS - SS64.com"](https://ss64.com/mac/syntax-defaults.html). *ss64.com*.

1. **[^](#cite_ref-12)** ["Top 11 Terminal Command Tricks for Mac That You Should Know"](https://www.guidingtech.com/top-terminal-command-tricks-mac-macos/). *Guiding Tech*. 19 August 2019.

1. **[^](#cite_ref-13)** ["Adjust SMB browsing behavior in macOS High Sierra 10.13 and later"](https://support.apple.com/en-us/HT208209). *Apple Support*. Retrieved 5 January 2020. (type into a search engine to find more: site:support.apple.com "defaults write")

## External links

- [NSUserDefaults documentation](https://developer.apple.com/documentation/foundation/nsuserdefaults?language=objc) Apple Inc

---
Adapted from the Wikipedia article [Defaults (software)](https://en.wikipedia.org/wiki/Defaults_(software)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Defaults_(software)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
