Let’s go through some different options of how you can take a screenshot in a Linux distro.
Screenshot – Ubuntu Tool
This is the default screen capture tool which is a very user friendly tool available on Linux. The Screenshot tool can take screenshots of your whole screen, specific windows and screen grab a selected area. Just start typing Screenshot in the Linux menu and the application should populate. You can also search and install using Terminal typing as follows
gnome-screenshot
Scrot – Command Line Tool/CLI
Scrot is a command line tool which can be handy for power users who may want to take a screenshot via SSH on a remote system. Scrot has many of the features available in a GUI alternative so a very handy tool. Check if you have scrot by searching application or in Terminal with the version command; scrot --version
You will see a version number if it’s installed or an error if not. To install via Terminal, run the folliwing command in Terminal
sudo apt-get install scrot
Once installed, we can take a screenshot by inputting this commands in the following format; scrot [file name] [file type]
Once the screenshot is taken, it can be found in the Root folder
scrot YourScreenshotName.jpg
We can use the some useful options to open extra features with the help of the –help option. Here are some highlighted options
- -s option to interactively select an area to screenshot
- -f option to freeze the screen when the selection is used
- -u option to use the currently focused window
- -a option to non-interactively choose a rectangle
We can take photos and entitle the screenshot with the current date and image dimensions. First we call Scrot, then insert the date, dimension fields and name the file including the extension/file type. We then run APP on the resulting screen shot, move the file to a different folder, provide the path/file name which is the Desktop folder in this example. It’s important to keep the single quotes and full and proper path directory. Here is the command in action;
scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/Desktop/'