Useful Mac Terminal Hijinks

Last updated: January 2, 2018

Change the Screenshot save location:

defaults write com.apple.screencapture location /your/path/here/

Reset the icons in Launchpad:

defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock

Show hidden files and folders:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE
killall Finder

Custom Login Message:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "In case of loss, call 555-555-5555."

Stay Awake

caffeinate -u -t 5400

Where -t is the number of seconds to stay awake
1 hour = 3600

Make Spacers for the Dock:

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
killall Dock

Install libdvdcss for use with Handbrake

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

then:

brew install libdvdcss


Visit the Archive for more posts.