Change the default save location for screenshots on macOS

First of all, here's how to take a screenshot on Mac.

By default, macOS saves screenshots to the Desktop.

If you want to save your screenshot in a custom location, you can use this command:

defaults write location ~/your/location/here

You now need to restart the system UI server, so run this command:

killall SystemUIServer

And that's it. Screenshots will now be saved to your new location.

To change back to the default location you can run

defaults write location ~/Desktop/

# Followed by
killall SystemUIServer
That's me!

I’m Ajay Karwal. I write about my experiences as a front-end developer. If you enjoy my content, please consider supporting what I do.

Become a PatronBuy me a coffee