--- metaTitle: "macOS defaults" meta: - property: "og:title" content: "A list of macOS defaults commands with demos ✨" - name: "description" content: "You've already copied `defaults write` commands. Sometimes you don't know what they do and are not sure they still work. This list of macOS defaults commands is here to help." - property: "og:description" content: "You've already copied `defaults write` commands. Sometimes you don't know what they do and are not sure they still work. This list of macOS defaults commands is here to help." - property: "twitter:card" content: "summary_large_image" - property: "twitter:image" content: "https://macos-defaults.netlify.app/media-2x1.webp" - property: "og:image" content: "https://macos-defaults.netlify.app/media-2x1.jpg" --- # macOS `defaults` list Uncomplete list of macOS `defaults` commands with demos ✨ ## 🙋 What's a `defaults` command?
macOS applications and other programs use the defaults
system to record user preferences and other information to be maintained when the application isn't running (font for new documents, or the position of an Info panel).
Much of this information is accessible through an application's Preferences panel but sometimes they're hidden.
User defaults belong to domains, which typically correspond to individual applications. 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, it may be specified in NSGlobalDomain.
Each domain has a dictionary of keys and values representing its defaults; e.g. "Default Font" = "Helvetica". Keys are strings, values can be complex data structures comprising arrays, dictionaries, strings, and binary data. They're stored as XML Property List.
The defaults
command line interface is a way to interact with these values.