How to take Screenshot with "scrot" from Linux Command Line

In this article, we will teach you how to use a nice command-line tool called scrot that is used take screenshots in your Linux machine. According to the description in the manual, this screen capture utility uses imlib2 library to acquire and save images. I like to practice the tool as much as possible, so let's open a new terminal (CTRL+ALT+T) and start the action.

Note: scrot is available in every repository, so the installation should be very easy.

How to take Screenshots with scrot

1. Run the following command to capture your whole screen.


how to take screenshot in linux

When used without an option, scrot utility will capture your whole screen and will save the output in the following format inside your home directory.

The format: year-month-day-screen_resolution_scrot.png.

2. If you like to select a window or grab a rectangle, you should use the -s option which is the short version of --selection.

scrot -s

Type the above command in your terminal, hit enter and select the area you want to grab with your mouse. The screenshot will be saved in your home directory.

3. A very useful option that I use alot and would like to share with you Linux geeks, is the -d option which is used to wait a number of seconds before taking a shot. You can also use the -c option while working with delays because it displays a nice countdown.

scrot -d 13 -c

how to take screenshot in linux

Oltjano Terpollari 3:00 am

About Oltjano Terpollari

Oltjano Terpollari is a very passionate computer geek studying python, linux, netcat power tools and living a binary life. He goes by the nickname Ambition and is very happy living a science life. He also loves technical blogging and sharing his knowledge with others.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.

1 Comment

  1. I know this column is years old. But, does anyone know about this command not working in fedora 26? I don't have a problem taking the shot. The shot is just blank!