How to change the location where OS X saves screenshots

About

By default OS X saves screenshots to the Desktop but if you don't want your Desktop cluttered with tons of images you can change the location where the screenshots are saved to.

In Finder go to the Applications / Utilities folder and open the Terminal application.

Now in the Terminal run the following two commands:

Change screenshot saving location
defaults write com.apple.screencapture location /path/to/screenshots/folder
killall SystemUIServer

Replace /path/to/screenshots/folder with the path where you want to save your screenshots. The first command will change the path while the second command is required for the changes to take effect.

Now every screenshot you take will be saved to the path you specified.