Ubuntu provide gnome-screenshot command to take screen shot using terminal.
1. Capture entire screen
$ gnome-screenshot
2.Capture only the current window
$ gnome-screenshot -w
3.Take Screenshot after some delay
$ gnome-screenshot -w -d 5
-d 2 used here to delay the screen shot by 5 seconds.