Skip to content

macOS Power User

System utilities, Homebrew management, and hidden settings.

Keyboard Symbols

Symbol Key
Cmd Command
Option Option
Ctrl Control
Shift Shift

Homebrew

Bundle — Reproducible Setup

Export your installed packages to a Brewfile:

brew bundle dump --file=~/Brewfile

Install everything from a Brewfile:

brew bundle --file=~/Brewfile

Maintenance

Update Homebrew and all packages:

brew update && brew upgrade

Clean up old versions:

brew cleanup --prune=all

List packages not depended on by anything:

brew leaves

mas — Mac App Store CLI

List installed App Store apps:

mas list

Search and install:

mas search "Xcode"
mas install 497799835

Install: brew install mas


System Utilities

caffeinate — Prevent Sleep

Keep the system awake for 2 hours:

caffeinate -t 7200

Keep awake while a command runs:

caffeinate -s ./long-running-script.sh

Software Updates

Check for and install all updates:

softwareupdate --list
softwareupdate --install --all

Disk Utilities

List all disks:

diskutil list

Get SMART status:

diskutil info disk0 | grep SMART

defaults write — Hidden Settings

Show all file extensions in Finder:

defaults write NSGlobalDomain AppleShowAllExtensions -bool true

Show hidden files in Finder:

defaults write com.apple.finder AppleShowAllFiles -bool true

Disable the "Are you sure you want to open this application?" dialog:

defaults write com.apple.LaunchServices LSQuarantine -bool false

Speed up Mission Control animations:

defaults write com.apple.dock expose-animation-duration -float 0.1

Speed up SMB network share browsing (skip .DS_Store reads):

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

Re-enable default behavior:

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool FALSE

Restart affected services after changes:

killall Finder Dock

Tip

Read current values first with defaults read <domain> <key> before changing them.


Clipboard

Copy a file's contents to clipboard:

pbcopy < ~/.ssh/id_ed25519.pub

Paste clipboard contents to a file:

pbpaste > output.txt

Finder Navigation

Shortcut Action
Shift+Cmd+. Toggle hidden files
Shift+Cmd+G Go to folder
Cmd+Shift+A Applications folder
Cmd+Shift+U Utilities folder

Quarantine Log

View all downloaded files macOS has tracked:

sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* \
  'select LSQuarantineDataURLString from LSQuarantineEvent'

Clear the log:

sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* \
  'delete from LSQuarantineEvent'