The defaults write Commands Actually Worth Running
Most lists of defaults write commands you find online are ten years old, and a good third of the entries do nothing on current macOS. This is the shorter list: commands that still work, grouped by what they change, each with the exact way to undo it.
How to use this list
Paste one command at a time. After each group, run the killall line that follows it, or log out and back in where noted. Before changing anything, you can see the current value:
# an error here means the key has never been set, which is normal
defaults read com.apple.dock autohide-delay
Dock
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.4
defaults write com.apple.dock show-recents -bool false
defaults write com.apple.dock no-bouncing -bool true
defaults write com.apple.dock minimize-to-application -bool true
defaults write com.apple.dock mineffect -string scale
defaults write com.apple.dock expose-group-apps -bool true
killall Dock
Undo: defaults delete com.apple.dock <key> then killall Dock. expose-group-apps groups Mission Control windows by application, which makes a busy screen far easier to read.
Finder
defaults write com.apple.finder AppleShowAllFiles -bool true
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder _FXSortFoldersFirst -bool true
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
defaults write com.apple.finder WarnOnEmptyTrash -bool false
killall Finder
SCcf means search the current folder. View styles are Nlsv list, clmv column, icnv icon, Flwv gallery.
Global, and file handling
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
Everything in this group needs a logout and login, not a killall. That is the most common reason people report these as not working.
Screenshots
defaults write com.apple.screencapture disable-shadow -bool true
defaults write com.apple.screencapture type -string jpg
defaults write com.apple.screencapture location ~/Pictures/Screenshots
defaults write com.apple.screencapture show-thumbnail -bool false
defaults write com.apple.screencapture include-date -bool false
killall SystemUIServer
Create the folder first with mkdir -p ~/Pictures/Screenshots, or the location setting silently falls back.
Privacy and system
defaults write com.apple.CrashReporter DialogType -string none
defaults write com.apple.LaunchServices LSQuarantine -bool false
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
defaults write com.apple.TextEdit RichText -int 0
A note on LSQuarantine: it removes the "downloaded from the internet, are you sure" prompt. That prompt exists for a reason, and turning it off is a real reduction in a safety net rather than a cosmetic change. Include it deliberately or not at all.
Mission Control and Spaces
defaults write com.apple.dock mru-spaces -bool false
defaults write com.apple.dock workspaces-auto-swoosh -bool false
defaults write com.apple.spaces spans-displays -bool true
killall Dock
The last one makes a Space span all your displays rather than each display having its own, which is a matter of taste — it is the opposite of the Displays have separate Spaces checkbox in System Settings, and it needs a logout.
Menu bar and clock
defaults write com.apple.menuextra.clock ShowSeconds -bool true
defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm"
defaults -currentHost write -globalDomain NSStatusItemSpacing -int 8
defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 6
Note the -currentHost on the last two, and that all four need a logout and login. Writing the clock format by hand overrides the Control Centre checkboxes, so choose one route and stay with it.
Undoing everything on this page
# remove one key
defaults delete <domain> <key>
# reset an entire domain to factory defaults
defaults delete com.apple.dock && killall Dock
Always delete, never write the opposite value. Writing false is a second change, not the removal of the first, and for some settings macOS behaves differently for "false" than for "unset".
Mainspring ships these as labelled toggles with plain-English descriptions, and reverts each one by removing the key rather than writing the opposite value.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once