Change the Screen Shot Save File Location in Mac OS X

Jan 26, 2011 - 57 Comments

Change where Mac saves screen shot files

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:

Change the screen shot save file location in Mac OS X

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.

Screen shots default save location in Mac OS X can be changed

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.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Manish Patel in Mac OS X, Tips & Tricks

57 Comments

» Comments RSS Feed

  1. David says:

    I always wondered if there was a way to do this

    • Paul says:

      Best of all, this works to change the screen shot save location in ALL versions of OS X… even in Yosemite it works!

  2. Manny C says:

    I just tried it and it worked… But only after I logged out and back in again. Your mileage may vary.

    • wizbang_FL says:

      Works in Mountain Lion as well. Noticed I had to close terminal after the kill command for the change to apply. Either that or there was a few minutes time delay.

  3. This is really great. Cluttering up the Desktop with Screen Shots is really disruptive so changing the location is very helpful. Thank you so much for this tip.

  4. Very convenient! I added a ‘Screenshots’ folder to the path so that it reads

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

    Easy! Thanks!

  5. Alex says:

    I’m doing it and it doesn’t work! For some reason the computer is TAKING the shots and NOT saving them on the desktop and I don’t know WHERE it’s saving them or how to find them… very annoying… then I did all this and it doesn’t work for some reason. I’d like to show you snapshots of what I’m doing, but for obvious reasons can’t, haha…

  6. Ouriel Ohayon says:

    does not work on OSX lion. someone managed?

  7. Ouriel Ohayon says:

    ok. copy pasting a comment i found in another forum. to make it work you need to follow this. instructions in the blog above are not enough…

    “You have to change the username (in caps below) and then the following needs to be consistent with the directory you want to use for the screen shots. Your user name is the user name of your computer which can be found by opening finder, click on “Macintosh HD” in the top left, then users and your user name should be the top folder. If you havent named it and you have an air, for example, it will just say “air”
    defaults write com.apple.screencapture location /Users/YOUR USER NAME GOES HERE/Desktop/printscreen/”

  8. Lguystillfly says:

    I have OSX Lion… and worked great for me. Have been wondering how to do this for a while now. Thanks! :)

  9. Bee says:

    I can take snapshots but they don’t appear on the desktop so I wanted to try to change the location so that I could find my snapshots in the future but I can’t find the program Terminal even though I know I had it. Also, my search tool or whatever doesn’t work either. I have the new Macbook with Snow Leopard (I think it is).

  10. Laura says:

    Thanks for the tip, worked great! It was so annoying having them scattered all over the desktop.

  11. Dustin says:

    I have OSX lion, and it also worked great for me too! I’m stoked! Here’s my path with its own screen shots folder. I named the folder: Screen_Shots.

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

    THANK YOU!

  12. [...] than changing file names, you can also change where screen shots save to and change file type to a format other than the PNG [...]

  13. TrueDee says:

    Just what I needed. Thanks!

  14. Alex says:

    If you’re temped to run sudo, don’t. Just run defaults write etc.

    This is great btw. Thanks for the tip.

  15. Donovan Meyers says:

    Fantastic, exactly what I was looking for!

    Here’s what I did, including cleanup:

    mkdir ~/Documents/screenshots
    defaults write com.apple.screencapture location ~/Documents/screenshots
    killall SystemUIServer
    mv ~/Desktop/Screen\ shot* ~/Documents/screenshots/

  16. Pook says:

    Yes, it works, but don’t put in that stupid tilde!

    • Maxwell says:

      The tilde represents the location of your user folder that you’re logged in with.

      ~/Pictures/Screenshots

      is the same as:

      /Users/youraccount/Pictures/Screenshots

  17. Victor says:

    Another way is to use Onyx to do this… It has this feature in the Parameters section under the General tab and you can also change the format from PNG to JPG or a few other options… Just thought I’d mention it…

  18. Andras says:

    Thanks it helped a lot! Was getting annoyed about missed up desktop!

  19. ukscoob says:

    Easy to follow even for a n00b.
    Done in under 10 seconds.
    Tested & works.
    Thanks!

  20. Liguo Kong says:

    Thanks. This helps a lot.

  21. Barry says:

    Awesome, thanks :)

    What a time saver not having to clean up my desktop all the time ^^

  22. Hollie says:

    Works like a charm! Thanks!
    osx 10.8.2

  23. [...] is to create a new folder in /Pictures/ or ~/Documents/ and then set that to the new default screen shot save location with a defaults write command: defaults write com.apple.screencapture location [...]

  24. Jonah says:

    Awesome! If you’re having trouble with a space in the file path, just leave it blank and drag your folder to the terminal window and OS X auto enters the path for you. Gotta love apple, Thanks for the Terminal codes here!

  25. Thanks for posting this.
    As of 10.8 , there is no need to restart the service.This applies automatically without service restart.

  26. BK says:

    Thank you, this was great!

  27. *m says:

    Works like a charm! Thanks!

  28. Mag says:

    Brilliant!! Thanks a lot! :-)

  29. KingTetroseWang says:

    Works very well. Tip: If you want to have the location in a folder on your desktop in Mt. Lion, put another / after the folder name to indicate you want it in a folder. E.g. ~/desktop/screenshots/

  30. jamauai says:

    I noticed for Mountain Lion at least, you cannot specify the full path to a directory in your home folder (for example /Users/admin/Downloads/). It will not work. I tried killall SystemUIServer, killall Finder, log out and back in, still nothing. You must use the “~” syntax in order for it to work. Then killall SystemUIServer and it worked perfectly. Just a little FYI.

  31. Chett says:

    Perfect!! Thanks for the help, just made my lesson planning even faster!!!

  32. ilan says:

    It works!!!!!!! thanks !!!!!

  33. Chad Bambrick says:

    I have Mavericks, and it isn’t working; any suggestions (I know that my path is correct because I actually dragged the file into terminal and it automatically added the path)? Also, should I have the “~” before the path or not (its confusing the way it’s written in the instructions.

  34. Rebecca says:

    Thank you! My desktop is a much happier place now. :)

    Works great in Mac OS X Version 10.6.8

    Sorry I don’t know if that’s Mountain Lion or Snow Leopard or Jungle Cat or whatever the fun name is ;)

  35. Wesam Alalem says:

    Thank you, I hate cleaning up Desktop, changing path works better :)

  36. Marcia says:

    Not working for me. The terminal will not save the code. Any code. I paste it in. Close the terminal window, open it back up. GONE!

    • Reado says:

      Read the instructions. You paste the code into the terminal, press ENTER to execute the command. It’s not supposed to be saved in the Terminal for the changes to take effect, it just executes once.

  37. Marcia says:

    BTW, running Mavericks.

  38. hüseyin says:

    nice document, thank you.

  39. herojig says:

    great tip, thx!

  40. beemelle says:

    Awesome tip, works a charm – THANKS!

  41. komrad says:

    This worked like a charm on OS X 10.9.3. Thanks for writing this.

  42. Voz says:

    I take a lot of screenshots. This tip works great on OS X 10.9.3.

    Thanks!

  43. Kaelan says:

    it says “-bash: defaults: command not found” Please Help ASAP?!?!?!

  44. Paul says:

    Hmm… not working in 10.9.5. I entered the commands in Terminal. No error message. Screen shots still showing up on Desktop.

    defaults write com.apple.screencapture location /Users/gina/Desktop/Swapping\ Files;killall SystemUIServer

    Tried quitting Terminal. No change. Tried logging out and back in. No change.

  45. Paul says:

    Ah… the folder on my Desktop is an alias to a shared folder I use for moving files among my several users (set up for testing). Apparently, you cannot specify an alias to a shared folder as the default screen capture location.

  46. Javster says:

    Not working on osx 10.9.5, I get this message:

    Rep argument is not a dictionary
    Defaults have not been changed

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates