How to take screenshot in Ubuntu terminal? Here is the shell script to take screenshot automatically; command to take screenshot in Ubuntu. The command line screenshot tool to take screenshot using shell script.
Command to Take Screenshot in Ubuntu
gnome-screenshot is a GNOME utility for taking screenshots of the entire screen, a window or an user-defined area of the screen, with optional beautifying border effects. gnome-screenshot command can capture the screen, a window, or an user-defined area and save the snapshot image to a file.
gnome-screenshot command syntax
gnome-screenshot [ -c ] [ -w ] [ -a ] [ -b ] [ -B ] [ -p ]
gnome-screenshot [ -d SECONDS ] [ -e EFFECT ] [ -i ] [ -f FILENAME ] [ –display DISPLAY ]
gnome-screenshot command options
-c, –clipboard: Send the grab directly to the clipboard.
-w, –window: Grab the current active window instead of the entire screen.
-a, –area: Grab an area of the screen instead of the entire screen.
-b, –include-border: Include the window border within the screenshot.
-B, –remove-border: Remove the window border from the screenshot.
-p, –include-pointer: Include the pointer with the screenshot.
-d, –delay=SECONDS: Take the screenshot after the specified delay [in seconds].
-e, –border-effect=EFFECT: Add an effect to the outside of the screenshot border. EFFECT can be shadow'' (adding drop shadow),
border” (adding rectangular space around the screenshot), vintage'' (desaturating the screenshot slightly, tinting it and adding rectangular space around it) or
none” (no effect). Default is “none”.
-i, –interactive: Interactively set options in a dialog.
-f, –file=FILENAME: Save screenshot directly to this file.
–display=DISPLAY: X display to use.
-?, -h, –help: Show a summary of the available options.
Using gnome-screenshot command
The simplest way to take screenwchot using gnome-screenshot command is to run the command without any syntax:
gnome-screenshot
This will take the screenshot instantly.
If you wish to to take a screenshot with a delay, enter the command with the number of seconds you want to delay. For example to take screenshot with a delay of 5 seconds, use the following command:
gnome-screenshot -d -5
Note that gnome screenshot command is the default tool. You don’t have to install it additionaly.