macOS ships with sensible defaults, but many useful settings are hidden behind Terminal commands that Apple does not expose in System Settings. If you prefer a minimal Dock, visible file extensions, or PNG screenshots, the defaults write command is your tool.

How defaults write works

macOS stores user and system preferences in .plist files. The defaults command reads and writes these files without needing to edit XML directly:

defaults write com.apple.dock autohide -bool true
killall Dock

The pattern is always defaults write <domain> <key> <type> <value>, followed by restarting the affected process so the change takes effect.

Dock customizations

Auto-hide the Dock:

defaults write com.apple.dock autohide -bool true
killall Dock

Remove the auto-hide delay (Dock appears instantly on hover):

defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.3
killall Dock

Set Dock icon size and enable magnification:

defaults write com.apple.dock tilesize -int 40
defaults write com.apple.dock magnification -bool true
defaults write com.apple.dock largesize -int 64
killall Dock

Minimize windows using the scale effect (faster than Genie):

defaults write com.apple.dock mineffect -string scale
killall Dock

Finder customizations

Show hidden files:

defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder

Always show file extensions:

defaults write NSGlobalDomain AppleShowAllExtensions -bool true
killall Finder

Show the path bar and full POSIX path in the title bar:

defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
killall Finder

Default to list view in all Finder windows:

defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
killall Finder

Screenshot settings

Change screenshot format to PNG (default is HEIC on newer versions):

defaults write com.apple.screencapture type -string png

Save screenshots to a custom folder:

defaults write com.apple.screencapture location -string "~/Desktop/Screenshots"
killall SystemUIServer

Generate your macOS script with BaseConf

Remembering every domain and key name is impractical. The BaseConf macOS Configurator lets you toggle Dock, Finder, screenshot, and input settings visually, then generates a shell script with every defaults write command and the correct killall calls included.

  1. Toggle the settings you want to change
  2. Review the script — every command is visible in the preview
  3. Copy or download the .sh file
  4. Run in Terminal with bash script.sh
  5. Revert using the generated undo script

Beyond macOS

BaseConf also supports Windows privacy, Windows debloat, and Linux server hardening. Use the Build Config page to generate scripts across platforms from a single interface.