Settings
Updated: November 24, 2025
Commands to change macOS settings.
Useful for when settings are hidden in menus or where Apple makes changes. These use the defaults command to modify system preferences.
Note: Some commands may require killall or sudo. Changes may require logging out/in or restarting affected apps.
Table of Contents
- Battery & Power
- Dock Settings
- Finder Settings
- General System
- Keyboard & Input
- Menu Bar & Clock
- Mission Control & Spaces
- Notifications & Focus
- Screenshots
- Security & Privacy
- Terminal & iTerm2
- TextEdit & QuickLook
- Trackpad & Mouse
Battery & Power
# Show battery percentage in menu bar
defaults write com.apple.menuextra.battery ShowPercent -string "YES"
# Show battery time remaining
defaults write com.apple.menuextra.battery ShowTime -string "YES"
# Disable battery health management (requires sudo)
sudo defaults write /Library/Preferences/com.apple.SMB.plist BatteryHealthManagement -bool NO
Dock Settings
# Restart Dock
killall Dock
# Set Dock size (12-128)
defaults write com.apple.dock tilesize -int 36
# Enable magnification
defaults write com.apple.dock magnification -bool YES
# Set magnification size
defaults write com.apple.dock largesize -int 54
# Auto-hide Dock
defaults write com.apple.dock autohide -bool YES
# Show only active apps in Dock
defaults write com.apple.dock static-only -bool YES
# Minimize windows into application icon
defaults write com.apple.dock minimize-to-application -bool YES
# Disable recent apps in Dock
defaults write com.apple.dock show-recents -bool NO
# Set Dock position (left, bottom, right)
defaults write com.apple.dock orientation -string "bottom"
Finder Settings
# Restart Finder
killall Finder
# Show hidden files
defaults write com.apple.finder AppleShowAllFiles -bool YES
# Show path bar
defaults write com.apple.finder ShowPathbar -bool YES
# Show full POSIX path in title bar
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
# Show status bar
defaults write com.apple.finder ShowStatusBar -bool YES
# Show file extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool YES
# Disable .DS_Store on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool YES
# Disable .DS_Store on USB volumes
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool YES
# Show Library folder
chflags nohidden ~/Library
# Show ~/Library in Finder
defaults write com.apple.finder AppleShowLibrary -bool YES
General System
# Show all processes in Activity Monitor
defaults write com.apple.ActivityMonitor ShowCategory -int 0
# Sort Activity Monitor results by CPU usage
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0
# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool YES
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool YES
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool YES
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool YES
# Disable the "Are you sure you want to open this application?" dialog
defaults write com.apple.LaunchServices LSQuarantine -bool NO
# Disable Resume system-wide
defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool NO
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool YES
Keyboard & Input
# Enable key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool NO
# Set key repeat rate (lower = faster)
defaults write NSGlobalDomain KeyRepeat -int 2
# Set initial key repeat delay (lower = shorter)
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Enable full keyboard access for all controls
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool NO
# Disable smart quotes and dashes
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool NO
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool NO
Menu Bar & Clock
# Show date in menu bar clock
defaults write com.apple.menuextra.clock DateFormat -string "EEE MMM d h:mm a"
# Show seconds in menu bar clock
defaults write com.apple.menuextra.clock ShowSeconds -bool YES
# Show AM/PM in menu bar clock
defaults write com.apple.menuextra.clock ShowAMPM -bool YES
# Show day of week in menu bar clock
defaults write com.apple.menuextra.clock ShowDayOfWeek -bool YES
# Restart SystemUIServer
killall SystemUIServer
Mission Control & Spaces
# Restart Dock (affects Mission Control)
killall Dock
# Disable Dashboard
defaults write com.apple.dashboard mcx-disabled -bool YES
# Don't show Dashboard as a Space
defaults write com.apple.dock dashboard-in-overlay -bool YES
# Disable automatic Spaces rearrangement
defaults write com.apple.dock mru-spaces -bool NO
# Hot corners (bottom-left: 0=disabled, 1=disabled, 2=Mission Control, etc.)
# Bottom-left corner: Mission Control
defaults write com.apple.dock wvous-bl-corner -int 2
defaults write com.apple.dock wvous-bl-modifier -int 0
# Bottom-right corner: Desktop
defaults write com.apple.dock wvous-br-corner -int 4
defaults write com.apple.dock wvous-br-modifier -int 0
Notifications & Focus
# Disable notification center
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
# Re-enable notification center
launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
# Disable Do Not Disturb when screen is locked
defaults write com.apple.notificationcenterui dndEnabledDisplayLock -bool NO
# Disable Do Not Disturb when mirroring
defaults write com.apple.notificationcenterui dndMirroring -bool NO
Screenshots
# Change screenshot location
defaults write com.apple.screencapture location ~/Desktop/Screenshots
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool YES
# Set screenshot format (png, jpg, pdf, tiff)
defaults write com.apple.screencapture type -string "png"
# Include date in filename
defaults write com.apple.screencapture include-date -bool YES
# Restart SystemUIServer
killall SystemUIServer
Security & Privacy
# Require password immediately after sleep or screen saver
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Disable Siri
defaults write com.apple.Siri StatusMenuVisible -bool NO
defaults write com.apple.Siri UserHasDeclinedEnable -bool YES
# Disable Spotlight suggestions
defaults write com.apple.spotlight orderedItems -array \
'{"enabled" = 1;"name" = "APPLICATIONS";}' \
'{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \
'{"enabled" = 1;"name" = "DIRECTORIES";}' \
'{"enabled" = 1;"name" = "PDF";}' \
'{"enabled" = 1;"name" = "FONTS";}' \
'{"enabled" = 0;"name" = "DOCUMENTS";}' \
'{"enabled" = 0;"name" = "MESSAGES";}' \
'{"enabled" = 0;"name" = "CONTACT";}' \
'{"enabled" = 0;"name" = "EVENT_TODO";}' \
'{"enabled" = 0;"name" = "IMAGES";}' \
'{"enabled" = 0;"name" = "BOOKMARKS";}' \
'{"enabled" = 0;"name" = "MUSIC";}' \
'{"enabled" = 0;"name" = "MOVIES";}' \
'{"enabled" = 0;"name" = "PRESENTATIONS";}' \
'{"enabled" = 0;"name" = "SPREADSHEETS";}' \
'{"enabled" = 0;"name" = "SOURCE";}' \
'{"enabled" = 0;"name" = "MENU_DEFINITION";}' \
'{"enabled" = 0;"name" = "MENU_OTHER";}' \
'{"enabled" = 0;"name" = "MENU_CONVERSION";}' \
'{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \
'{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \
'{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}'
Trackpad & Mouse
# Enable tap to click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool YES
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Enable three-finger drag
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool YES
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool YES
# Disable natural scroll direction
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool NO
# Increase trackpad tracking speed
defaults write -g com.apple.trackpad.scaling 2
Terminal & iTerm2
# Enable Secure Keyboard Entry in Terminal
defaults write com.apple.terminal SecureKeyboardEntry -bool YES
# Disable line marks in Terminal
defaults write com.apple.Terminal ShowLineMarks -int 0
TextEdit & QuickLook
# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0
# Open and save files as UTF-8 in TextEdit
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
# Disable QuickLook animation
defaults write -g QLPanelAnimationDuration -float 0
Note: These commands are tested on macOS Sonoma (14.x). Some may work on earlier versions, but compatibility isn’t guaranteed. Always backup your system before making changes.