The macOS Property List Architecture
In Windows, advanced system configurations and hidden application behaviors are stored in the sprawling, centralized Windows Registry. In macOS, Apple opted for a decentralized approach. Almost every application (and the macOS system itself) stores its settings in individual XML files called Property Lists (.plist), usually located in the hidden ~/Library/Preferences/ directory.
While you can theoretically open these .plist files in a text editor to change settings, doing so is highly dangerous and can corrupt the file. The correct, Apple-approved way to modify these hidden preference files is by using the defaults command in the Terminal.
This command allows power users to write specific values directly into the preferences database, unlocking hidden features, changing UI behaviors, and disabling annoyances that Apple does not expose in the standard System Settings application.
The Syntax of defaults
The command generally follows a strict syntax:
defaults write [domain] [key] [value]
- Domain: The internal identifier for the application (e.g.,
com.apple.finder). - Key: The specific setting you want to change.
- Value: The new setting (usually a boolean
TRUE/FALSE, or an integer).
Note: After writing a new default, you often have to restart the affected application for the change to take effect. For system-level changes, you usually restart the Finder or the Dock using the killall command.
The Best Hidden defaults Commands
Here are several highly useful commands to customize your Mac.
1. Show Hidden Files in Finder
By default, macOS hides thousands of system files from the user to prevent accidental deletion. If you are a developer, you need to see these files.
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
To revert, change TRUE to FALSE and run it again.
2. Show the Full POSIX Path in the Finder Title Bar
Instead of just showing the name of the folder you are currently in (e.g., “Documents”), this command forces Finder to display the full, absolute file path at the top of every window (e.g., /Users/jsmith/Documents).
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
killall Finder
3. Disable the Crash Reporter Dialog
If an application crashes, macOS displays a large, annoying pop-up asking if you want to send a report to Apple. If you are developing unstable software, this pop-up becomes infuriating. You can disable it entirely.
defaults write com.apple.CrashReporter DialogType -string "none"
4. Change the Default Screenshot Location
macOS clutters your Desktop by saving every screenshot directly to it. You can redirect all screenshots to a dedicated folder (e.g., a folder named “Screenshots” in your Documents).
First, create the folder, then run:
defaults write com.apple.screencapture location ~/Documents/Screenshots
killall SystemUIServer
5. Disable the “Application Downloaded from Internet” Warning
When you download an app outside the Mac App Store and open it for the first time, macOS pauses to warn you that it was downloaded from the internet. You can permanently disable this quarantine warning.
defaults write com.apple.LaunchServices LSQuarantine -bool false
Reading Existing Values
If you want to check what a setting is currently configured to before you change it, use the read command instead of write.
defaults read com.apple.finder AppleShowAllFiles
The terminal will output either a 1 (True) or a 0 (False).
Conclusion
The defaults command is the skeleton key for macOS customization. By interacting directly with the underlying property list architecture, you can tailor the operating system’s behavior precisely to your workflow, exposing features Apple deemed too complex for the standard graphical interface.