There are many Linux applications dedicated to taking screenshots. However, you minght want to use the command line to do this, either because you want to build an automated script, or because you have a terminal screen handy.
This will allow you to select a rectangle using your mouse. The moment you let go of your left mouse button, a screenshot with the contents of that rectangle will be saved in the current directory.
And then there’s scrot.
scrot -d 4 screenshot.png
This will take a screenshot of your entire desktop, with a delay of 4 seconds between launching the command and saving the screenshot.png file. Use
scrot -c -d 4 screenshot.png
to also display a countdown in the console. Use
scrot -q 80 -c -d 4 screenshot.jpg
to save a JPG file with a quality of 80%.
You can also use special strings with scrot, as to produce filenames that contain the date and size of the screenshot:
scrot ‘%Y-%m-%d_$wx$h.png’ -e ‘mv $f ~/Desktop/Pictures/’
The command above will produce a file named 2010-11-28_2560x1024.png on my system and move that file to to a folder called Pictures, residing on my desktop.