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

Fortunately, there is scrot, a terminal-based tool that can take screenshots on Ubuntu. scrot was originally released in 2000 and is still going strong – with the latest major stable update in June 2020.

So let's start with installing scrot on Ubuntu.

How do I install scrot on Ubuntu?

The scrot screenshot tool is preinstalled on most Linux computers. So it could already exist on your system. If not, run this command on the terminal to install the package:

sudo apt-get install scrot

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

How to use scrot to take screenshots

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

And so scrot takes a fairly simple approach to screen clipping on Ubuntu as well.

Take a screenshot of the entire screen

To start with, take a screenshot of a full window on Ubuntu:


That's it. Scrot will automatically record the screen. Also, unless otherwise stated, the At home Directory contains the screenshots that you take with scrot.

Save a screenshot with a specific name and directory

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


And that's what you get when you run the above command:

Using scrot to capture the current window

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

scrot -u

Notice that once you click on Enter, scrot captures the current window which is the Ubuntu Terminal app.

This is something 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 recording.

scrot -u -d 5

The -d 5 in the above command delays your screenshot by five seconds, giving you enough time to minimize any additional windows, including the terminal.

Create a thumbnail along with a screenshot

You can also throw in -t num Command that also creates a thumbnail for your screenshot. number here stands for the percentage in relation to the original screenshot.

So if you type something like this:

scrot -u -d 5 -t 30

You will receive a screenshot along with a thumbnail that is 30% the size of your original screenshot.

Take a screenshot for a specific area or app

If you want, you can also use scrot to cut out a specific area in the window that you want the -s Possibility.

scrot -s

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

Change the image quality of a screen clip

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

scrot -s -q 100

This takes a high quality picture of a selected part of the window.

Take high quality screenshots on Ubuntu

Scrot is a simple command line utility that uses the command line to get things done. Designed with the minimalist UNIX philosophy in mind, most of its commands are fairly easy 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.

Unix vs. Linux: The Differences Between, and Why It Matters

Before Linux was developed, the computing world was dominated by Unix. What is the difference between Linux and Unix?

Continue reading

About the author

Shaant Minhas
(48 published articles)

Shaant is a staff writer at MUO. As a graduate in computer applications, he uses his passion for writing to explain complex things in plain English. When he's not researching or writing, he can enjoy a good book, run, or hang out with friends.

From Shaant Minhas

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!

One more step …!

Please confirm your email address in the email we just sent you.