Take Screenshots Directly From The Terminal In Linux Mint/Ubuntu
Scrot is a command line utility that can directly take screenshots from the Terminal.
To install it in Ubuntu/Linux Mint, open Terminal and type the following :
[cc lang=”bash”]
sudo apt install scrot
[/cc]
Once installed, it is easy to use.
To directly take a screenshot of the Terminal :
[cc lang=”bash”]
scrot
[/cc]
What this will do is save the screenshot with a timestamp in the current directory.

To save a screenshot in other location :
[cc lang=”bash”]
scrot locationpath
[/cc]
So for example, to save a screenshot of the Terminal to the Pictures folder in the home directory and name it as term.jpg, the command will be :
[cc lang=”bash”]
scrot ~/Pictures/term.jpg
[/cc]

Scrot can also be used to take a screenshot of any window, not just the Terminal. To do that, use the delay parameter with the number of seconds as delay time :
[cc lang=”bash”]
scrot -d 10 ~/Pictures/test.jpg
[/cc]
The above command will after a delay of 10 seconds take a screenshot of the currently active window with focus. The screenshot will be saved as test.jpg in Pictures folder of the home directory.

You can also take a screenshot of the entire desktop, simply set a delay timer and then minimize all the windows. Also, it can be useful to have a countdown timer when using this delay option. The count parameter does just that.
So, to take a screenshot after a delay of 15 seconds with countdown display and save it in current directory with timestamp, the command will be :
[cc lang=”bash”]
scrot -d 15 -c
[/cc]

To save it in a different directory with a preferred file name :
[cc lang=”bash”]
scrot -d 15 -c /home/avp/Documents/dd.png
[/cc]

There are other parameters too like for running an application on the saved screenshot, interactively selecting a window, generating screenshot thumbnails and so on.
A detailed list can be viewed using the man command :
[cc lang=”bash”]
man scrot
[/cc]

This is a handy command line tool for taking basic screenshots. If you want a graphical interface, the default screenshot tool can also be quite useful.
All done.