There are many ways to take screenshot in Linux. If you have Gnome or KDE you can simply press your ‘print screen’ button and you are done.
If you don’t run either one of these desktops you can always use the screenshot functionality built into GNU Image Manipulation Program aka GIMP. Open up GIMP and navigate to File -> Create -> Screenshot.
The third method and my favorite is to do it from the command line.
To do this you need to use the import command which is part of ImageMagik package. You will need to make sure that this is installed before you continue.
The import command saves any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen.
The format for import looks like this.
import [options] input-file
To create a screenshot of the entire root window and output in PNG format run this command.
$ import -window root screenimage.png
You can change the format of the image by simply changing the file extension. For example this command outputs the same root window but in JPEG format.
$ import -window root screenimage.jpg
Another great feature is that you can get a screenshot of a single window. Run this command.
$ import screenimage.jpg
After you enter this command your mouse curser will turn from a pointer into a crosshair. Now go and click on any window on your desktop and the screenshot that is created will be of only that window.