How to Use the macOS defaults Command to Manage Hidden System Preferences

The Limitations of System Settings

The macOS graphical interface (System Settings) is designed to be user-friendly, hiding the overwhelming complexity of the underlying UNIX operating system. However, for power users, developers, and Mac system administrators, this graphical limitation is frustrating. Apple intentionally hides hundreds of granular configuration options—such as altering the speed of Mission Control animations, permanently showing hidden files in Finder, or changing the default screenshot file format.

To access and modify these hidden configurations, you must bypass the GUI and interact directly with the macOS property list (plist) architecture using the Terminal. The native tool designed for this is the defaults command.

Understanding the Preferences Subsystem

In macOS, application preferences and system settings are stored in XML or binary .plist files, typically located in ~/Library/Preferences/ (for user-specific settings) or /Library/Preferences/ (for system-wide settings).

The defaults command interacts with the cfprefsd (CoreFoundation Preferences Daemon) service to safely read, write, and delete keys within these plist files, ensuring the changes are correctly cached and applied.

The syntax is straightforward:

defaults <action> <domain> <key> <value>
  • Action: Usually read, write, or delete.
  • Domain: The reverse-DNS identifier of the application (e.g., com.apple.finder).
  • Key: The specific setting you want to change.
  • Value: The new data (string, integer, boolean) to assign to the key.

Step 1: Revealing Hidden Files in Finder

By default, macOS hides system files and dotfiles (like .bash_profile or .ssh) in the Finder. While you can temporarily reveal them using the Cmd + Shift + . shortcut, many developers prefer them to be permanently visible.

To permanently show hidden files, you write a TRUE boolean value to the Finder domain:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE

Because the Finder is currently running and caching its old preferences, you must forcefully restart the Finder process to apply the change:

killall Finder

Step 2: Changing the Default Screenshot Format and Location

When you take a screenshot (Cmd+Shift+3), macOS saves it to the Desktop as a heavy PNG file. For users who take dozens of screenshots a day, this clutters the Desktop and consumes unnecessary space.

To change the default save location to a dedicated folder (e.g., ~/Pictures/Screenshots):

mkdir -p ~/Pictures/Screenshots
defaults write com.apple.screencapture location ~/Pictures/Screenshots

To change the default file format from PNG to highly compressed JPG:

defaults write com.apple.screencapture type jpg

Apply the changes by restarting the SystemUIServer (the process responsible for the menu bar and screenshot hotkeys):

killall SystemUIServer

Step 3: Accelerating macOS Animations

macOS relies heavily on fluid, bouncy animations for window management (Mission Control, Launchpad, window resizing). While visually pleasing, these animations take a fraction of a second, which feels sluggish to power users.

You can use defaults to drastically reduce the duration of these animations.

To speed up the Mission Control animation:

defaults write com.apple.dock expose-animation-duration -float 0.1

To completely disable the spring-loaded delay when dragging files over folders in Finder:

defaults write NSGlobalDomain SpringingDelay -float 0

Restart the Dock to apply the Mission Control changes:

killall Dock

Step 4: Disabling the Crash Reporter Dialog

When an application crashes on macOS, the system intercepts the crash and presents a massive dialog box asking if you want to send a report to Apple. If you are a developer actively debugging unstable code, this popup appears constantly and interrupts your workflow.

To banish the crash reporter dialog completely (crashes will still be logged to the Console silently):

defaults write com.apple.CrashReporter DialogType -string "none"

Step 5: Exploring and Reverting Changes

The defaults command is incredibly powerful, but it can also break application behavior if you write invalid data types to a plist. Always document your changes.

To view every single configured preference for a specific application (e.g., Safari):

defaults read com.apple.Safari

If you make a mistake and want to revert a specific key to its factory default state, use the delete action. This removes the key entirely, forcing macOS to fall back to its internal default:

defaults delete com.apple.screencapture type

Conclusion

The defaults command is the definitive tool for customizing macOS beyond the limitations of System Settings. By carefully modifying domain plists, power users can drastically optimize the graphical interface, automate system configurations across fleets of Macs, and unlock hidden features that Apple reserves exclusively for the command line.

RELATED POSTS

  • How to Create a Spanning Bootable RAID 0 Array on macOS Using Disk Utility
  • How to Create Custom Keyboard Shortcuts for Text Replacement on macOS
  • How to Use the macOS dsenableroot Command to Enable the Root User
  • How to Use the macOS softwareupdate Command to Install System Updates from the Terminal
  • How to Use Mission Control to Manage Windows and Virtual Desktops on Mac
  • Get the best tech tips delivered straight to your inbox.

    Join thousands of readers mastering Apple, Google, Microsoft, and Linux.