A fresh Mac ships with defaults tuned for demos, not daily work. Tracking is on, hidden files are hidden, FileVault may be off, and the Dock wastes screen space. Fix the 20 settings below in about 30 minutes. Most take one click in System Settings, and the rest take one line in Terminal.
Quick Takeaways
- Security first: enable FileVault, the firewall, and Lockdown-adjacent privacy toggles before installing anything.
- Productivity next: tune trackpad, keyboard repeat, Dock, Finder, and Spotlight to cut daily friction.
- Power-user layer: use
defaults writecommands to expose file extensions, hidden files, and faster animations. - Maintenance: turn on automatic updates and Time Machine so the Mac stays patched and recoverable.
Prerequisites and Environment
- OS tested: macOS Tahoe 26 (menu paths match Sonoma 14 and Sequoia 15 with minor label changes).
- Hardware: Apple Silicon or Intel.
- Account: an admin user. Some commands require
sudo. - Terminal: open /System/Applications/Utilities/Terminal.app or use iTerm2.
Settings live in System Settings (the replacement for System Preferences). Command-line changes use the defaults tool, which writes to property lists in ~/Library/Preferences/.
How macOS Stores Settings
Every GUI toggle writes a key to a .plist file. The defaults command reads and writes those keys directly. Apps such as Finder and Dock cache values, so you must restart the process with killall for a change to appear.
| Layer | Location | Scope | Edited via |
|---|---|---|---|
| User plist | ~/Library/Preferences/ | Current user | System Settings, defaults write |
| System plist | /Library/Preferences/ | All users | sudo defaults write |
| MDM profile | /Library/Managed Preferences/ | Managed fleet | Configuration Profiles |
| NVRAM | Firmware | Boot parameters | nvram, Startup Security Utility |
Section 1: Security and Privacy (Settings 1-6)
1. Enable FileVault Disk Encryption
FileVault encrypts the whole APFS volume with XTS-AES-128. A lost laptop then exposes nothing.
GUI: System Settings > Privacy & Security > FileVault > Turn On
Terminal:
sudo fdesetup enable
Check status:
fdesetup status
Store the recovery key in a password manager, not on the Mac itself.
2. Turn On the Firewall
The built-in application firewall blocks unsolicited inbound connections.
GUI: System Settings > Network > Firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on
--setglobalstate onactivates the firewall.--setstealthmode onstops the Mac from answering ICMP ping and port probes.
3. Require Password Immediately After Sleep
GUI: System Settings > Lock Screen > Require password after screen saver begins or display is turned off > Immediately
Also set Turn display off on battery when inactive to 5 minutes or less.
4. Lock Down Analytics and Personalized Ads
GUI: System Settings > Privacy & Security > Analytics & Improvements
Disable Share Mac Analytics, Share with App Developers, and Improve Siri & Dictation. Then open Privacy & Security > Apple Advertising and turn off Personalized Ads.
5. Audit Location Services and App Permissions
GUI: System Settings > Privacy & Security > Location Services
Review every app. Disable anything that does not need your location. Then walk through Full Disk Access, Accessibility, Screen & System Audio Recording, and Input Monitoring. Remove apps you do not recognize.
6. Verify Gatekeeper and System Integrity Protection
Gatekeeper blocks unsigned apps. SIP protects system directories such as /System and /usr.
spctl --status
csrutil status
Expected output: assessments enabled and System Integrity Protection status: enabled. Never disable either on a daily-driver Mac.
Section 2: Input Devices and Display (Settings 7-10)
7. Enable Tap to Click and Three-Finger Drag
GUI (tap to click): System Settings > Trackpad > Point & Click > Tap to click
GUI (three-finger drag): System Settings > Accessibility > Pointer Control > Trackpad Options > Use trackpad for dragging > Three Finger Drag
Three-finger drag moves windows and selects text without pressing down.
8. Speed Up Key Repeat
The default repeat rate is slow. Set it faster for editing and terminal work.
GUI: System Settings > Keyboard and raise Key repeat rate and lower Delay until repeat.
Terminal (faster than the GUI allows):
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
KeyRepeatis measured in 15 ms units. A value of2means 30 ms between repeats.InitialKeyRepeatsets the delay before repeating begins.15equals 225 ms.
Log out and back in to apply.
9. Disable Press-and-Hold Accent Popup
Press-and-hold opens an accent picker and blocks key repeat in editors such as VS Code.
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
10. Turn On Night Shift and True Tone
GUI: System Settings > Displays > Night Shift (schedule it sunset to sunrise) and enable True Tone if supported.
Under Displays > Advanced, enable Automatically adjust brightness.
Section 3: Dock, Finder, and Interface (Settings 11-16)
11. Shrink and Auto-Hide the Dock
GUI: System Settings > Desktop & Dock. Set size to roughly 40%, enable Automatically hide and show the Dock, and disable Show suggested and recent apps in 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.3
killall Dock
autohide-delay 0removes the hover wait.autohide-time-modifier 0.3shortens the slide animation.
12. Show File Extensions and Hidden Files
Hidden extensions disguise malware (invoice.pdf.app shows as invoice.pdf).
GUI: Finder > Settings > Advanced > Show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
Toggle hidden files on demand with Cmd + Shift + . instead if you prefer a cleaner view.
13. Set Finder Defaults: List View, Path Bar, Status Bar
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder _FXSortFoldersFirst -bool true
killall Finder
Nlsvis list view. Other codes:icnv(icon),clmv(column),glyv(gallery)._FXSortFoldersFirstgroups folders above files.
14. Search the Current Folder by Default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
killall Finder
SCcf limits search to the current folder instead of the whole Mac.
15. Stop Creating .DS_Store Files on Network Drives
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
This prevents clutter on SMB and NFS shares, which matters on shared servers.
16. Save Screenshots to a Dedicated Folder
Screenshots flood the Desktop by default.
mkdir -p ~/Pictures/Screenshots
defaults write com.apple.screencapture location ~/Pictures/Screenshots
defaults write com.apple.screencapture disable-shadow -bool true
defaults write com.apple.screencapture type -string "png"
killall SystemUIServer
disable-shadowremoves the drop shadow around window captures.typeacceptspng,jpg,pdf, orheic.
Section 4: Spotlight, Updates, and Backups (Settings 17-20)
17. Tune Spotlight Indexing
GUI: System Settings > Spotlight. Disable categories you never search (Fonts, Presentations, Events & Reminders).
To exclude a developer folder such as ~/node_modules projects, add it under Spotlight > Search Privacy. This cuts mds_stores CPU usage.
18. Enable Automatic Updates and Rapid Security Responses
GUI: System Settings > General > Software Update > (i) next to Automatic updates. Enable every option, including Install Security Responses and system files.
softwareupdate --list
sudo softwareupdate --install --all
--listshows pending updates.--install --allapplies them all.
19. Configure Time Machine
GUI: System Settings > General > Time Machine > Add Backup Disk
sudo tmutil setdestination /Volumes/BackupDrive
sudo tmutil enable
tmutil listbackups
Encrypt the backup disk when prompted. Exclude large caches:
sudo tmutil addexclusion -p ~/Library/Caches
20. Turn On Find My Mac and Set Up Remote Wipe
GUI: System Settings > [your name] > iCloud > Find My Mac > On
Enable Find My network so the Mac stays locatable offline. Activation Lock then blocks a thief from erasing and reselling the device.
Settings Comparison: GUI vs. Terminal
| Task | GUI Path | Terminal Option | Best For |
|---|---|---|---|
| FileVault | Privacy & Security | fdesetup |
Both |
| Key repeat speed | Keyboard | defaults write KeyRepeat |
Terminal (faster values) |
| Dock auto-hide delay | Not exposed | autohide-delay |
Terminal only |
| Show hidden files | Cmd + Shift + . | AppleShowAllFiles |
Either |
| Screenshot location | Cmd + Shift + 5 > Options | screencapture location |
Either |
| Firewall stealth mode | Firewall > Options | socketfilterfw |
Either |
Automate the Whole Setup with a Script
Save the commands as a single file and rerun it on every new Mac.
#!/bin/bash
# ~/mac-setup.sh
set -e
# Keyboard
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# 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.3
# Finder
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Screenshots
mkdir -p ~/Pictures/Screenshots
defaults write com.apple.screencapture location ~/Pictures/Screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Network drives
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
for app in Dock Finder SystemUIServer; do killall "$app"; done
echo "Done. Log out and back in to apply keyboard changes."
Run it:
chmod +x ~/mac-setup.sh && ~/mac-setup.sh
set -estops the script on the first error.chmod +xmarks the file executable.
For full machine provisioning, pair this script with Homebrew and a Brewfile:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew bundle dump --file=~/Brewfile
Troubleshooting: Real-World Scenarios
Scenario 1: A defaults write Change Does Nothing
Cause: The target process still holds the old value in memory.
Fix: Restart the process.
killall Finder
killall Dock
killall SystemUIServer
Keyboard settings need a logout. Verify the stored value:
defaults read NSGlobalDomain KeyRepeat
Scenario 2: FileVault Stuck on “Waiting for Encryption”
Cause: The disk is encrypting in the background, or the Mac is asleep.
Fix: Keep the Mac plugged in and awake. Check progress:
diskutil apfs list | grep -i "FileVault"
Encryption on Apple Silicon is hardware-assisted and usually finishes within minutes.
Scenario 3: Terminal Cannot Modify Settings (Operation Not Permitted)
Cause: Terminal lacks Full Disk Access.
Fix: System Settings > Privacy & Security > Full Disk Access, then add Terminal.app and relaunch it.
Scenario 4: Spotlight Is Eating CPU After Setup
Cause: Initial indexing after migration or restoring from backup.
Fix: Wait 30-60 minutes. Check status and rebuild only if it hangs:
mdutil -s /
sudo mdutil -E /
-sreports indexing status.-Eerases and rebuilds the index.
Scenario 5: Reset a Setting to Its Default
Delete the key and restart the process:
defaults delete com.apple.dock autohide-delay
killall Dock
Verification Checklist
Run these after setup to confirm the critical items:
fdesetup status
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
csrutil status
spctl --status
tmutil latestbackup
softwareupdate --schedule
Each command should report an enabled or active state.
FAQ
What should I change first on a new Mac?
Enable FileVault, the firewall, and automatic updates. These three settings protect your data and keep macOS patched. Adjust trackpad, Dock, and Finder preferences afterward.
Is it safe to use defaults write commands?
Yes. Each command changes one key in a user-level .plist file and is fully reversible with defaults delete. Avoid sudo defaults write on system domains unless you know the key.
How do I show hidden files on a Mac?
Press Cmd + Shift + . in Finder to toggle them instantly. For a permanent change, run defaults write com.apple.finder AppleShowAllFiles -bool true and then killall Finder.
Does FileVault slow down a Mac?
No measurable slowdown on Apple Silicon or Intel Macs with a T2 chip. Encryption runs in dedicated hardware, so the performance impact is negligible.




