I know in ubuntu, I can use Screenshot application using which I can take a screen shot for selected window. This means there is the application already on ubuntu. What's the command line command for that application? (I know gnome-screenshot lets us take the whole screenshot, but I want to select a region when taking the shot.)
In order to grab a screenshot of window, use this command
gnome-screenshot -w
In order to grab an area, use this command
gnome-screenshot -a
here is the link for source http://manpages.ubuntu.com/manpages/bionic/man1/gnome-screenshot.1.html