Mac maintenance
Useful 'defaults write' Tricks for Mac Power Users
A practical list of defaults write commands that change Mac behavior in ways System Settings won't — Finder, Dock, screenshots, and more.
You’ve poked through every panel in System Settings, and the thing you actually want to change isn’t there. Like making screenshots not pile up on the desktop, or stopping the Dock from auto-rearranging spaces. The setting exists — Apple just doesn’t expose it in the UI.
That’s what defaults write is for. It’s the command-line interface to macOS’s preference system, the same store the Settings app reads from. Every app and every system component has a domain (the bundle ID), and inside that domain there are key-value pairs you can flip from the Terminal.
Here are the tweaks that are actually worth knowing in 2026.
How defaults works (the 60-second version)
Three commands cover 95% of what you’ll do:
defaults read com.apple.finder
defaults write com.apple.finder ShowPathbar -bool true
defaults delete com.apple.finder ShowPathbar
read dumps the current values for a domain. write sets one. delete resets it to the default.
Most changes only take effect after you restart the affected process. For Finder and the Dock, that’s:
killall Finder
killall Dock
For things like SystemUIServer (menu bar, screenshots): killall SystemUIServer. For preferences read at login: log out and back in.
Finder: show the path bar, hidden files, and full path in title
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder AppleShowAllFiles -bool true
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
killall Finder
The path bar appears at the bottom of every Finder window. Hidden files (everything starting with a dot) become visible — Cmd+Shift+. toggles this in real time, but the default state is what we’re setting. The last one puts the absolute path in the window title, which is useful when you’ve got six “Documents” folders open from different volumes.
To turn the desktop’s “stuff sticking out from beneath the window” effect off:
defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false
killall WindowManager
If you came from older macOS and just want clicking the desktop to do nothing, this is the one.
Screenshots: change format, location, and shadow
By default, screenshots save to ~/Desktop as PNGs with a window shadow. All three are configurable:
mkdir -p ~/Pictures/Screenshots
defaults write com.apple.screencapture location ~/Pictures/Screenshots
defaults write com.apple.screencapture type jpg
defaults write com.apple.screencapture disable-shadow -bool true
defaults write com.apple.screencapture name "Screenshot"
killall SystemUIServer
The type accepts png, jpg, pdf, tiff, and a few others. Setting disable-shadow removes the drop shadow from window screenshots taken with Cmd+Shift+4 then space.
To stop the floating thumbnail that appears in the corner after a screenshot:
defaults write com.apple.screencapture show-thumbnail -bool false
killall SystemUIServer
Dock: speed up Mission Control and disable rearranging spaces
If you use Spaces, the auto-rearranging by recent use will drive you up a wall. Pin them in place:
defaults write com.apple.dock mru-spaces -bool false
killall Dock
Speed up Mission Control’s animation:
defaults write com.apple.dock expose-animation-duration -float 0.15
killall Dock
The default is around 0.4. Going below 0.1 makes it look broken on Apple Silicon — 0.15 is the sweet spot.
If Dock auto-hide is too slow:
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.4
killall Dock
autohide-delay is the lag before the Dock starts to slide; autohide-time-modifier scales the slide animation itself.
To make hidden apps’ Dock icons translucent:
defaults write com.apple.dock showhidden -bool true
killall Dock
Disable the .DS_Store on network drives
Finder writes a .DS_Store file in every folder it touches, which pollutes shared network volumes and irritates everyone you share with:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
The second one extends this to USB drives. Log out and back in for it to take effect.
Stop autocorrect, smart quotes, and dash substitution
These are system-wide and affect every Cocoa app:
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
NSGlobalDomain is the system-wide preferences domain, also written as -g. So defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false is the same thing.
Apps that use their own text engine (Sublime Text, VS Code, JetBrains) ignore these. Apple’s own apps (Notes, Mail, TextEdit) all respect them.
Faster key repeat
System Settings’ “Key Repeat” slider goes up to 30. The actual value can go higher:
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
KeyRepeat is how often a held key fires; 1 is the fastest macOS will go. InitialKeyRepeat is the delay before repeating starts; 10 is roughly 150ms. Log out and back in.
Save dialogs default to expanded
The default save dialog only shows the dropdown of recent folders. To always get the full file browser:
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
Same for Print dialogs:
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
Activity Monitor: show CPU usage in the Dock icon
defaults write com.apple.ActivityMonitor IconType -int 5
killall "Activity Monitor" 2>/dev/null
Values: 0 is the application icon, 2 is network usage, 3 is disk activity, 5 is CPU usage history, 6 is CPU usage. Restart Activity Monitor for it to update.
Show full server addresses in Safari
Safari hides the URL by default and only shows the domain. Bring back the full URL:
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true
Restart Safari.
Mail: format messages as plain text
Apple Mail composes in rich text. To switch the default to plain text:
defaults write com.apple.mail SendFormat -string "Plain"
You can still override per-message with Format > Make Rich Text.
Trackpad: tap to click on the login screen too
Tap-to-click in the Settings app only applies after login. To extend it to the login screen:
sudo defaults write /Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
sudo defaults write /Library/Preferences/.GlobalPreferences com.apple.mouse.tapBehavior -int 1
Note the sudo — this writes to a system-level preference file, not your user one.
Disable the “are you sure you want to open this app” dialog forever
For an app you’ve explicitly approved and don’t want to be asked about again:
defaults write com.apple.LaunchServices LSQuarantine -bool false
This stops new downloads from being quarantined. Be selective about when you set it — it’s a small layer of protection against unintentionally double-clicking a freshly downloaded .app.
Finding new tweaks
Apple doesn’t document defaults keys. The way you find new ones is to compare a domain before and after toggling a UI setting:
defaults read com.apple.finder > before.txt
# toggle the setting in Finder preferences
defaults read com.apple.finder > after.txt
diff before.txt after.txt
The line that changed is the key. This works for any app that uses NSUserDefaults, which is most of them.
Resetting when something breaks
If you’ve messed up a domain badly enough that the app won’t launch:
defaults delete com.apple.dock
killall Dock
The next launch recreates the file with defaults. You’ll lose your Dock layout, but the Dock will work again.
For a more surgical reset, only delete the specific key:
defaults delete com.apple.dock expose-animation-duration
killall Dock
A starter tweak script
Drop this in ~/bin/macprefs and run after every clean install:
#!/bin/bash
set -e
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
defaults write com.apple.dock mru-spaces -bool false
defaults write com.apple.dock expose-animation-duration -float 0.15
defaults write com.apple.screencapture disable-shadow -bool true
defaults write com.apple.screencapture show-thumbnail -bool false
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
for proc in Finder Dock SystemUIServer; do
killall "$proc" 2>/dev/null || true
done
echo "Done."
defaults write isn’t going to clean up your disk, but it’ll make your Mac feel like yours in ways that ten years of Settings panels haven’t caught up to.