In my dotfiles repository you can find a shell file to configure macOS to some defaults I like. But often you don’t want to do all that changes at once and are looking just for that one command. So here is a (non final) list of commands that I think are handy.

Finder setup

All Finder tweaks must be followed by @killall Finder@ to take effect.

Show all file name extensions

defaults write NSGlobalDomain AppleShowAllExtensions -bool true

Show status bar

defaults write ShowStatusBar -bool true

Show path bar

defaults write ShowPathbar -bool true

Avoid creating .DS_Store files on network volumes and USB drives

defaults write DSDontWriteNetworkStores -bool true  
defaults write DSDontWriteUSBStores -bool true

Show the ~/Library folder

chflags nohidden ~/Library

Dock setup

To let the Dock modification take effect don’t forget to type killall Dock.

Automatically hide and show the Dock

defaults write autohide -bool true

Remove the auto-hiding Dock delay

defaults write autohide-delay -float 0

Remove the animation when hiding/showing the Dock

defaults write autohide-time-modifier -float 0

Safari tweaks

All followed by a killall Safari.

Prevent Safari from opening ‘safe’ files automatically after downloading

defaults write AutoOpenSafeDownloads -bool false

Hide Safari’s bookmarks bar by default

defaults write ShowFavoritesBar -bool false

Some other tweaks

Disable autocorrect

defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

Disable shadows in screenshots

defaults write disable-shadow -bool TRUE
killall SystemUIServer

Configuring your printer’s defaults

In Terminal run cupsctl WebInterface=yes, then visit http://localhost:631/printers in your browser. Here you can select your printer and change all the defaults to your favourite settings.