Show hidden files in Finder
Reveals dotfiles and hidden folders everywhere in Finder. Tip: ⌘⇧. toggles this temporarily in any Finder window.
defaults write com.apple.finder AppleShowAllFiles -bool true && killall FinderTerminal commands for the Mac settings Apple doesn’t put in System Settings: hidden files, Dock behaviour, screenshot options, keeping your Mac awake and checking battery health.
32 commands
Shows .pdf, .png, .app and every other extension in Finder.
defaults write NSGlobalDomain AppleShowAllExtensions -bool true && killall FinderAdds the folder path to the bottom of every Finder window.
defaults write com.apple.finder ShowPathbar -bool true && killall FinderMakes ~/Library visible in Finder permanently.
chflags nohidden ~/LibraryHides the Dock and removes the delay before it slides back in.
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.4 && killall DockUndoes the instant auto-hide tweak.
defaults delete com.apple.dock autohide-delay && defaults delete com.apple.dock autohide-time-modifier && killall DockAdds an empty gap you can drag between apps to group them.
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' && killall DockRestores the original Dock apps and settings.
defaults delete com.apple.dock && killall DockYour custom Dock layout is lost.
Stops screenshots cluttering your Desktop.
mkdir -p ~/ && defaults write com.apple.screencapture location ~/ && killall SystemUIServerUse jpg, png, heic, pdf or tiff. Smaller JPGs are handy for sharing.
defaults write com.apple.screencapture type -string ""Window captures (⌘⇧4 then Space) no longer include the drop shadow.
defaults write com.apple.screencapture disable-shadow -bool truePrevents the display sleeping for the given number of seconds. Leave off -t to stay awake until you press Ctrl+C.
caffeinate -d -t Fixes websites that won’t load after a DNS change.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderShows the battery’s cycle count, condition and maximum capacity.
system_profiler SPPowerDataType | grep -E "Cycle Count|Condition|Maximum Capacity"Model, chip, memory and serial number.
system_profiler SPHardwareDataTypePrints the product name, version and build.
sw_versThe Mac’s address on your Wi-Fi network (use en1 if en0 is empty).
ipconfig getifaddr en0Re-copies the clipboard as plain text, dropping fonts and colours. (ClepBoard also removes hidden characters.)
pbpaste | pbcopyPuts the whole file on the clipboard without opening it.
pbcopy < Opens a Finder window for the folder your Terminal is in.
open .Speaks the text aloud. Chain it after long commands: npm run build; say done.
say ""Switches between Light and Dark appearance.
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode'Makes held keys repeat faster than System Settings allows. Log out and back in to apply.
defaults write NSGlobalDomain KeyRepeat -int 2 && defaults write NSGlobalDomain InitialKeyRepeat -int 15Holding a letter repeats it instead of showing accent options. Restart apps to apply.
defaults write -g ApplePressAndHoldEnabled -bool falseFinder won’t litter shared and network folders with .DS_Store files.
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool trueRemoves the download quarantine flag from an app you trust.
xattr -dr com.apple.quarantine ""Bypasses a Gatekeeper safety check. Only do this for apps from sources you trust.
Fixes Spotlight not finding files. Re-indexing takes a while in the background.
sudo mdutil -E /Restarts the audio service; it relaunches automatically.
sudo killall coreaudiodFlushes disk caches from memory.
sudo purgeTurns off the display immediately; locks if a password is required after sleep.
pmset displaysleepnowInstalls git, make, clang and other tools developers need, without the full Xcode app.
xcode-select --installEvery command copies as plain, clean text: no curly quotes, no long dashes, no invisible characters.