The Ubuntu environment boasts of a lively culture of open-source development and the resulting high-quality free apps. Talking about screenshot apps, there are a ton of them. There's GIMP, Shutter, and many more. But there's a problem: most of these apps use a graphical user interface. But what if you are more of a command-line person?

Luckily for you, there's scrot, a terminal-based tool that can capture screenshots on Ubuntu. Initially released in the year 2000, scrot is still going strong—with the latest major stable update on June 2020.

So, let's start with installing scrot on Ubuntu.

How to Install scrot on Ubuntu?

The scrot screenshot tool comes pre-installed on most Linux computers. So, it might already be there on your system, too. If not, run this command on the terminal to install the package:

        sudo apt-get install scrot
    

Hit Enter and the system will start installing scrot in a few seconds.

How to Use scrot to Capture Screenshots

Scrot is a minimalist command-line tool based on the UNIX philosophy of Ken Thomson, a philosophical approach to software development that celebrates small, clean, and modular programming.

And so, scrot follows a fairly simple approach for screen clipping on Ubuntu, too.

Take a Screenshot of the Whole Screen

To start, here's how you can screenshot a complete window on Ubuntu:

        scrot
    

That's it. Scrot will capture the screen automatically. Also, unless mentioned otherwise, the home directory will contain the screenshots that you capture with scrot.

capturing a screenshot on ubuntu with scrot

Save a Screenshot With Specific Name and Directory

If you want to save your screenshots at a specific location, you simply have to change your directory. By default, scrot saves the screenshots in your current working directory.  Moreover, you can also give the screenshot a specific name if you want. Here's how:

        scrot file1.png
    
changing the directory on terminal

And this is what you'll get on executing the command mentioned above:

taking a modified ubuntu screen clip with scrot

Using scrot to Capture the Current Window

If you want to capture a screenshot of whatever that is on focus on your screen now, be it a browser window, an app, or something else, you can use this command:

        scrot -u
    

Note that as soon you hit Enter, scrot will capture the current window, which will be the Ubuntu Terminal app.

taking a screenshot of specific ubuntu window with scrot

This is something that you probably don't want. To counter this, you can use the -d flag as follows:

        scrot -u -d num
    

...where -d stands for Delay and num is the number of seconds you want to delay the capture for.

        scrot -u -d 5
    

The -d 5 in the aforementioned command will delay your screenshot for five seconds, leaving you enough time to minimize all the extra windows, including the terminal.

delayed ubuntu screenshot with scrot

Create a Thumbnail Along With a Screenshot

You can also throw in the -t Num command, which will also create a thumbnail for your screenshot. Num here stands for the percentage with respect to the original screenshot.

So, if you type something like this:

        scrot -u -d 5 -t 30
    

You'll get a screenshot, along with a thumbnail that's 30% the size of your original screenshot.

Capture a Screenshot for a Specific Area or App

If you want, you can also use scrot to screen clip a specific area on the window, for which you'll have to use the -s option.

        scrot -s
    

After executing the command, drag your mouse (while pressing the button) over the area that you want to capture and release the cursor to capture it.

Alter the Image Quality of a Screen Clip

With scrot, you also get an option to change the quality of your screenshot. All you have to do is use the -q flag with the command. The default image quality is 75, so you'll have to use this command if you want the best possible screenshots.

        scrot -s -q 100
    

This will capture a high-quality image of a selected portion of the window.

Capturing High-Quality Screenshots on Ubuntu

Scrot is a lightweight command-line utility that makes use of the command line for getting things done. Designed with the minimalistic UNIX philosophy, most of its commands are fairly simple to use and remember.

Although Unix and Linux are quite similar in terms of usage and architecture, there are certain differences between the two operating systems.