macOS hides a lot of power-user tools right in the terminal. Here are 20 you should know.
pbcopy/pbpaste — Clipboard¶
echo “Hello” | pbcopy pbpaste > output.txt
open — Open Anything¶
open . open -a “Visual Studio Code” . open https://google.com
caffeinate — Prevent Sleep¶
caffeinate -t 3600 caffeinate -w 12345
mdfind — Spotlight from Terminal¶
mdfind “docker compose” mdfind -name “config.yml”
say — Text to Speech¶
say “Build complete” say -v Zuzana “Ahoj”
defaults — Hidden Settings¶
defaults write com.apple.finder AppleShowAllFiles -bool true defaults write com.apple.dock autohide-delay -float 0
networkQuality¶
networkQuality
diskutil¶
diskutil list diskutil apfs list
Network Tools¶
lsof -i -P | grep LISTEN sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Utilities¶
shasum -a 256 file.txt file mystery_file log show –last 1h
Conclusion¶
The combination of Unix fundamentals with Apple-specific tools makes the Mac terminal a productive environment.