Sometimes can be useful to have a small program that you can run from the command line and able to do a screenshot of your desktop or just a portion of it, for this task the perfect software is: scrot
Scrot (SCReenshOT) is a screen capture utility using the imlib2 library to aquire and save images. scrot has a few really interesting options, detailed below. The basic usage is to specify a [file] as the filename to save the screenshot to and scrot will take a screenshot of the whole desktop.
The latest release (0.8) has almost 10 years, still this small program can be useful for his ability to be run completely from the command line and so you could use it to concatenate other commands or just because it’s really lightweight and easy to use.