How to change macOS screenshot location

Tired of screenshots going to the desktop? Me too! Luckily it's pretty easy to change the default location for macOS screenshots from the command line.

To see where screenshots are currently being captured execute the following:

defaults read com.apple.screencapture |grep 'location ='

To change where screenshots are captured by default, execute the following:

Be sure to change /User/myuser/Images to the actual path you want to use.

defaults write com.apple.screencapture location "/User/myuser/Images"

Restart the system UI server for the settings to take effect:

killall SystemUIServer

That's it!