Change the Screen Shot Save File Location in Mac OS X
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:
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”:
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:
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.
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 and Command+Shift+4 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.
Screen Capture in Mac OS X
Jun 9, 2010 - 12 Comments
I use screenshots constantly to share bits of information with people, and they can be really helpful when troubleshooting as well.
Here’s all you’ll need to know about taking screenshots in Mac OS X, from capturing the screen in Mac OS X Finder and within applications, to changing the default screenshot file type, to taking screenshots from the command line.
Capturing screenshots in Mac OS X
You can use any of these commands to take screenshots directly in Mac OS X Finder or any running applications:
- Command+Shift+3: takes a screenshot of the full screen (or screens if multiple monitors), and save it as a file to the desktop
- Command+Shift+4: brings up a selection box so you can specify an area to take a screenshot of, then save it as a file to the desktop
- Command+Shift+4, then spacebar, then click a window: takes a screenshot of a window only and saves it as a file to the desktop
- Command+Control+Shift+3: take a screenshot of the entire screen (screens if multiple monitors), and saves it to the clipboard for pasting elsewhere
- Command+Control+Shift+4, then select an area: takes a screenshot of selection and saves it to the clipboard for pasting elsewhere
- Command+Control+Shift+4, then space, then click a window: takes a screenshot of a window and saves it to the clipboard for pasting
Some of the above instructions are borrowed from our print screen on a Mac article.
Change the screen capture file format
You can change the default file type for screen captures by using a terminal command. Most major image formats are supported including PNG, PDF, GIF, TIFF, and JPG, we’ll go with JPG since that is a common type of web graphic:
Then you must kill the SystemUIServer for changes to take effect:
defaults write com.apple.screencapture type jpg
Then you must kill the SystemUIServer for changes to take effect:
Take a screenshot from the command line
You can take screenshots from the command line by using the screencapture utility:
screencapture test.jpgThe screen capture will then appear in the directory that the command was executed.
If you want to open the screencapture in Preview immediately after being taken, type:
screencapture -P test.jpg
You can also take screenshots silently, without the sound playing with -x:
screencapture -x silentscreenshot.jpg
If you would like to have a delay added to when the screenshot is taken use -T followed by a number of seconds:
screencapture -T 3 delayedpic.jpg
Specifying a file type is easy with the -t flag:
screencapture -t pdf pdfshot.pdf
Naturally you can combine them all together:
screencapture -xt pdf -T 4 pic.jpg
You can get a full list of screencapture flags by typing: