By default, anytime you take a screen capture in Mac OS X, the resulting screenshot file will save to the current users desktop. This makes retrieval very easy and is very appropriate for the average Mac user, but for those who take a lot of screen shots in OS X, they may find their desktop to be cluttered with the screenshot files rather quickly.

An excellent solution is to adjust the default location of where Mac OS X saves captured screen shot files to another location in the file system when Command + Shift + 3 is pressed, this walkthrough will show you how to do that with a defaults command.

How to Change Where Screen Shots Save on Mac

You will need to use the command line to change the save location of screen shots in Mac OS X. Thus, the first thing you’ll need to do is launch the Terminal app from /Applications/Utilities/ to get a prompt.

The general syntax for changing screenshot file location is as follows, note it must be entered on a single line and with a proper path set for the new screencapture save location to take effect:

defaults write com.apple.screencapture location /path/;killall SystemUIServer

Change the ‘/path/’ sequence to where you want the screen shot files to save to. For example, if I want to have the screenshots appear in the user (~) Pictures folder, I would use:

defaults write com.apple.screencapture location ~/Pictures/

Hit the return key to set ~/Pictures as the location. You’ll need to follow it up with a SystemUIServer relaunch too:

killall SystemUIServer

Here is what this defaults sequence may look like as entered into the Terminals command line prompt:

Remember that ~ (tilde) is a shortcut to the current user home directory. A full path can be used as well, as we’ll discuss in a moment.

If you want to make a unique folder within the ~/Pictures/ directory to save your screen shots too, you can do that from the Finder as usual, or from the command line with the following command to create a directory named “Screenshots”:

mkdir ~/Pictures/Screenshots/

Now to set that new directory as the default saved location for captured screen images use the following syntax:

defaults write com.apple.screencapture location ~/Pictures/Screenshots/

For the changes to take effect without rebooting, kill SystemUIServer process to relaunch it and set the location:

killall SystemUIServer

That’s it, hit “Command+Shift+3” to take a screen shot and watch as the file is no longer saved to the user Desktop, but to the newly defined screen shot location.

This means the next time you take a screenshot (or as Windows converts like to say, Print Screen on a Mac), the screenshot file will appear at the location you specified.

Note that some users in the comments have experienced syntax issues when typing the tilde (~) as a shortcut for the Home folder, that shouldn’t be an issue if used properly, but nonetheless you can get around that by implying a full path to the home directory as follows:

defaults write com.apple.screencapture location /Users/USERNAME/Pictures/

Where “USERNAME” is the precise shortname of the users home directory, followed by the desired path to set as the save location for future screen captures. Again, one must killall SystemUIServer or log out and back in again for the change to take effect.

Changing Back to the Default Screen Shot File Save Location in Mac OS X

If you decide having screencaptures automatically saved to another location on the Mac is no longer what you’d like to do, you can always change the saved screenshot location back to the OS X default setting simply by specifying the desktop again in the aforementioned defaults command sequence. The default save location would thus be the following:

defaults write com.apple.screencapture location ~/Desktop/

Again, you’d need to kill SystemUIServer for changes to take effect.

killall SystemUIServer

You can again verify the change has been set back to the default by hitting Command+Shift+3 to capture the screen as a file in OS X, and look on the active user accounts desktop to find the screen shot file.

For many users, maintaining the Desktop as the default location of the screen shot files to generate is perfectly fine, this trick is really intended for individuals who use Command+Shift+3 for screen captures often and find the desktop file generation to be a distraction or otherwise difficult to manage. Users may also find useful to change the file name of generated screen shots as well as the image file type that is used, both of which can be widely customized to accommodate preferences.

This command works in all versions of Mac OS X.