DEV Community

Cover image for Best macOS Settings for Developers in 2027 (Copy-Paste Commands for a New Mac)
prabhanjan sharma
prabhanjan sharma

Posted on AI-assisted

Best macOS Settings for Developers in 2027 (Copy-Paste Commands for a New Mac)

A new Mac ships with settings tuned for everyone. These are the macOS settings developers should change in 2027, most of them one command, so you can paste them into a setup script.

Keyboard

# faster key repeat (log out to apply)
defaults write -g KeyRepeat -int 2
defaults write -g InitialKeyRepeat -int 15
# hold a key to repeat it instead of showing accents
defaults write -g ApplePressAndHoldEnabled -bool false
Enter fullscreen mode Exit fullscreen mode

Also: System Settings, Keyboard, Keyboard Shortcuts, and turn off the Spotlight shortcut if you use a launcher such as Raycast.

Finder

defaults write com.apple.finder AppleShowAllFiles -bool true      # hidden files
defaults write NSGlobalDomain AppleShowAllExtensions -bool true   # file extensions
defaults write com.apple.finder ShowPathbar -bool true            # path bar
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true  # no .DS_Store on network drives
killall Finder
Enter fullscreen mode Exit fullscreen mode

Dock

defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock show-recents -bool false
killall Dock
Enter fullscreen mode Exit fullscreen mode

Screenshots

mkdir -p ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots
defaults write com.apple.screencapture type png
killall SystemUIServer
Enter fullscreen mode Exit fullscreen mode

Touch ID for sudo

sed "s/^#auth/auth/" /etc/pam.d/sudo_local.template | sudo tee /etc/pam.d/sudo_local
Enter fullscreen mode Exit fullscreen mode

This uses the sudo_local file macOS added in Sonoma, so it survives system updates.

Spotlight and indexing

Add your projects folder, or at least big node_modules trees, to System Settings, Spotlight, Search Privacy. Indexing millions of dependency files wastes battery and slows searches.

Name the machine

sudo scutil --set ComputerName "dev-mbp"
sudo scutil --set HostName "dev-mbp"
sudo scutil --set LocalHostName "dev-mbp"
Enter fullscreen mode Exit fullscreen mode

Windows, disk and the notch

Three things settings alone cannot fix, each with its own guide:

Put it in a script

Save the blocks above as macos-setup.sh in your dotfiles and you will never configure a Mac by hand again.

What setting do you change first on a new Mac? Tell me in the comments.

Top comments (0)