Capturing screenshots on Linux is a breeze, whether you’re using the classic GNOME desktop, the sleek KDE Plasma, or any other popular desktop environment. With just a few keystrokes or clicks, you can easily preserve a snapshot of your screen, be it for sharing, documentation, or personal reference. In this guide, we’ll delve into the various methods for taking screenshots on Linux, ensuring you have a comprehensive understanding of this essential computer skill.
Using the built-in screenshot utility is the most straightforward method for capturing screenshots on Linux. Most desktop environments come with a pre-installed utility that provides basic screenshot functionality. For instance, in GNOME, you can press the “PrtScn” key to capture a screenshot of the entire screen. Alternatively, you can press “Ctrl+PrtScn” to capture only the active window. These screenshots are automatically saved to your Pictures directory as PNG images.
For more advanced screenshotting options, you can utilize external tools like Shutter or Flameshot. These tools offer a wide range of features such as delayed screenshots, region selection, annotation tools, and image editing capabilities. Shutter, for example, allows you to capture a screenshot of an entire web page, even if it extends beyond the visible area on your screen. Flameshot, on the other hand, provides a convenient annotation toolbar for quickly adding highlights, arrows, and text to your screenshots.
Using the Keyboard Shortcut
The most straightforward and widely used method to capture a screenshot on Linux is through keyboard shortcuts. This technique is convenient and can be performed quickly, making it ideal for capturing impromptu screenshots.
To take a screenshot using the keyboard shortcut, press the “Print Screen” key located on the top row of your keyboard. Alternatively, on some keyboards, you may need to press “Fn” + “PrtScn” simultaneously. Upon pressing the shortcut, you will hear a shutter sound, indicating that the screenshot has been captured.
By default, the captured screenshot is not saved to a specific location. Instead, it is stored in the system’s clipboard. You can then paste the screenshot into an image editor, document, or other application to save or share it.
Additional Details:
Keyboard Shortcut | Action |
---|---|
PrtScn | Captures the entire screen |
Alt + PrtScn | Captures the active window only |
Shift + PrtScn | Captures the selected area |
Utilizing the Mouse
Utilizing the mouse provides a straightforward and efficient method for capturing screenshots on Linux. Follow these steps to take a screenshot using this method:
-
Position the mouse cursor over the desired area you want to capture.
-
Capturing Specific Areas:
- Hold down the Alt key while clicking and dragging the cursor to select the desired area.
- Once you release the mouse button, a small menu will appear with the following options:
- Copy to Clipboard: Copies the screenshot to your clipboard.
- Save to File: Saves the screenshot as an image file to your preferred location.
- Cancel: Discards the screenshot.
By selecting one of these options, you can capture and store the screenshot as per your requirements.
- Capturing Entire Screen:
- Simply press the Print Screen key (usually labeled as "PrtScn" or "PrtSc").
- This will capture a screenshot of the entire desktop and copy it to your clipboard.
- To save the screenshot as an image file, open an image editor (such as GIMP or Inkscape) and paste the screenshot from the clipboard.
Capture a Specific Area
To capture a screenshot of a specific area on Linux, you can use the `gnome-screenshot` tool. Here’s how:
- Press the `Print Screen` key to open the screenshot tool.
- Select the “Select area” option from the menu.
- Click and drag the mouse cursor over the area you want to capture. A blue rectangle will appear to indicate the selected area.
- Release the mouse button to take the screenshot.
The screenshot will be saved as a PNG file in the ~/Pictures/Screenshots directory.
Advanced Options for Capturing a Specific Area
The `gnome-screenshot` tool offers several advanced options for capturing a specific area:
Option | Description |
---|---|
Delay | Sets a delay (in seconds) before taking the screenshot, giving you time to position the cursor and select the desired area. |
Confirm | Prompts you to confirm the selection before taking the screenshot. |
Include cursor | Captures the mouse cursor in the screenshot. |
To access these options, click the “Options” button in the screenshot tool and select the desired settings.
Capture the Entire Webpage
Steps:
-
Open the web page you want to capture.
-
Right-click on the page and select "Inspect Element."
-
In the developer tools window, click on the "More tools" button (three dots) and select "Capture full page screenshot."
-
Additional Details:
Configure the following settings in the "Capture full page screenshot" dialog box to customize your screenshot:
Setting Description Capture visible area only Captures only the currently visible portion of the webpage. Preserve log Includes the console log in the screenshot. Scroll vertically Takes a vertical screenshot of the entire webpage. Scroll horizontally Takes a horizontal screenshot of the entire webpage. Touch events Captures a screenshot as if the webpage was touched. Fixed layout Captures a screenshot in a fixed layout, regardless of the screen size. -
Click on the "Capture" button to take the screenshot.
-
The screenshot will be saved to your computer as a PNG file.
Taking a Full-Screen Screenshot
To capture a screenshot of the entire screen, follow these steps:
- Press the Print Screen key on your keyboard.
- Open an image editing program like Microsoft Paint or GIMP.
- Click on the Edit menu and select Paste.
- Save the image in the desired format using the File menu and Save As option.
Extended Steps for Detailed Screenshot Capture
- Initiate Screenshot Capture: Press the Print Screen key to capture a full-screen screenshot.
- Copy Screenshot to Clipboard: The screenshot is temporarily stored on the clipboard, ready to be pasted.
- Open Image Editing Software: Launch an image editing software such as Microsoft Paint or GIMP.
- Paste Screenshot: Under the Edit menu, select Paste to transfer the screenshot into the software.
- Crop and Enhance: (Optional) If desired, use the cropping tools to adjust the screenshot’s dimensions and utilize enhancement features like brightness, contrast, and color correction to optimize the image.
Action | Description |
---|---|
Press Print Screen | Captures the full-screen image. |
Open Image Editing Software | Creates a canvas to paste the screenshot. |
Paste into Software | Places the screenshot onto the canvas. |
Crop and Enhance (Optional) | Improves the screenshot’s appearance (e.g., cropping, adjusting colors). |
Save Screenshot | Preserves the screenshot in a desired format (e.g., JPEG, PNG). |
Advanced Options using the Screenshot Utility
The screenshot utility provides a range of advanced options that enable you to customize and refine your screenshots. These options allow you to set specific regions, capture windows, or apply various effects to your images.
To access these options, open the screenshot utility and click on the “Options” button in the top-right corner of the window. You will be presented with a number of options that can be adjusted to your liking.
Customizing the Screenshot Region
The screenshot utility allows you to select a specific region of your screen to capture. To do this, click on the “Region” tab within the options window. Here, you can specify the exact dimensions of the region you want to capture, ensuring that you only capture the most relevant information.
Capturing Specific Windows
If you only want to capture a specific window or application, the screenshot utility provides the option to do so. Click on the “Window” tab within the options window and select the window you want to capture from the drop-down menu. The screenshot utility will then only capture the selected window, excluding any other elements on your screen.
Applying Effects to Screenshots
The screenshot utility offers a variety of effects that can be applied to your screenshots. These effects include blurring, pixelation, and highlighting. To apply an effect, click on the “Effects” tab within the options window and select the desired effect from the drop-down menu. You can also adjust the intensity of the effect using the slider provided.
Effect | Description |
---|---|
Blur | Blurs the screenshot to varying degrees |
Pixelate | Pixelates the screenshot to create a mosaic-like effect |
Highlight | Highlights a specific area of the screenshot |
Setting a Default Save Location
For added convenience, you can set a default save location for your screenshots. This eliminates the need to manually select a destination each time you capture a screenshot. Here’s how to do it:
Using GNOME Screenshot Utility
- Open GNOME Screenshot Utility from the Activities menu or application launcher.
- In the preferences window, select the "Save" tab.
- Under "Default Save Location," select "Specific folder" and specify the desired directory.
Using Flameshot Screenshot Tool
- Launch Flameshot from the Activities menu or application launcher.
- Click on the "Options" icon in the toolbar.
- In the "General" tab, under "Save," select "Save screenshots to" and specify the default save location.
Using Shutter Screenshot Tool
- Open Shutter from the Activities menu or application launcher.
- In the main window, click on "Edit" and select "Preferences."
- In the "General" settings, under "Default Save Location," select the desired directory.
Using ImageMagick
If you prefer using command-line tools, you can set the default save location for screenshots using ImageMagick.
- Open a terminal window.
- Run the following command:
convert -window root screenshot.png
Replace "screenshot.png" with the desired filename for your screenshot. This command will capture the entire screen and save it to the current working directory.
To set the default save location, add the "-write" option followed by the desired directory. For example:
convert -window root -write /home/username/Screenshots/ screenshot.png
This command will save the screenshot to the "/home/username/Screenshots/" directory.
Capturing with a Command-Line Tool
The command-line tool for capturing screenshots is scrot
. It offers a range of customization options, allowing you to fine-tune the output to your specific needs.
Basic Usage
To take a screenshot using scrot
, simply open up a terminal window and type scrot
followed by the desired options. For example, the following command will capture the entire screen and save it as a PNG file named “screenshot.png”:
scrot -s screenshot.png
Advanced Options
scrot
provides a wide range of advanced options that allow you to customize the screenshot capture process. Here are some commonly used options:
Delay
The -d
option specifies a delay in seconds before the screenshot is taken. This is useful for capturing drop-down menus or transient effects.
scrot -d 3 screenshot.png
Region
The -s
option allows you to specify a rectangular region to capture. The syntax is -s left,top,width,height
.
scrot -s 100,100,400,300 screenshot.png
Format
The -f
option specifies the output file format. Supported formats include PNG, JPEG, and BMP.
scrot -f jpg screenshot.jpg
Quality
The -q
option sets the JPEG compression quality. A lower quality value will produce a smaller file size, but may also result in reduced image quality.
scrot -q 75 screenshot.jpg
Selection
The -c
option allows you to select a specific window or area on the screen to capture. The syntax is -c window_id
or -c area_id
.
scrot -c $(xwininfo -id $(xprop -root 32772 29)) screenshot.png
Automating Screenshots with Crontab
Crontab is a powerful Linux tool that allows you to schedule tasks to run at specific times. This can be useful for automating repetitive tasks, such as taking screenshots. Here’s how to use Crontab to automate screenshots on Linux:
1. Install the crontab package
If you don’t already have the crontab package installed, you can install it with the following command:
“`
sudo apt install crontab
“`
2. Create a crontab file
To create a crontab file, open a terminal window and type the following command:
“`
crontab -e
“`
This will open the crontab file in your default text editor.
3. Add a crontab entry
To add a crontab entry, add a line to the crontab file in the following format:
“`
minute hour day-of-month month day-of-week command
“`
For example, the following crontab entry will take a screenshot every day at 5:00 AM:
“`
0 5 * * * gnome-screenshot -f /home/username/Desktop/screenshot.png
“`
You can use the following table to help you understand the different fields in the crontab entry:
| Field | Description |
|—|—|
| minute | The minute of the hour to run the command |
| hour | The hour of the day to run the command |
| day-of-month | The day of the month to run the command |
| month | The month of the year to run the command |
| day-of-week | The day of the week to run the command |
| command | The command to run |
4. Save the crontab file
Once you have added your crontab entry, save the crontab file and exit the text editor. The changes will take effect immediately.
5. Test the crontab entry
To test your crontab entry, you can use the following command:
“`
crontab -l
“`
This will display the contents of the crontab file. You should see your new crontab entry listed.
6. Troubleshooting
If you are having trouble getting your crontab entry to work, you can try the following troubleshooting tips:
* Make sure that the crontab file is saved in the correct location. The crontab file should be located at /etc/crontab.
* Make sure that the crontab entry is in the correct format. The crontab entry should be in the following format:
“`
minute hour day-of-month month day-of-week command
“`
* Make sure that the command is executable. The command should be located in a directory that is included in the PATH environment variable.
* Make sure that the user who is running the crontab entry has permission to execute the command.
Using Third-Party Screenshot Tools
If you’re looking for more advanced screenshotting capabilities or want to capture screenshots of specific areas or applications, consider using third-party screenshot tools. Numerous free and premium options are available, each offering its unique features and functionality.
### 1. Greenshot
Greenshot is a popular, open-source screenshot tool that’s both powerful and easy to use. It allows you to capture the entire screen, selected windows, or specific regions and even apply annotations and effects.
### 2. Flameshot
Flameshot is another open-source screenshot tool that’s known for its user-friendly interface and customizable shortcuts. It offers various capture modes, including rectangular, circular, and freeform, and allows you to annotate and share screenshots seamlessly.
### 3. Shutter
Shutter is a comprehensive screenshot tool that provides an extensive set of features. It allows you to schedule screenshots, set up keyboard shortcuts, and apply advanced editing options. Shutter also integrates with cloud storage services for easy sharing.
### 4. Kazam
Kazam is a screencasting tool that can also be used for taking screenshots. It allows you to capture your entire screen or specific windows and record audio and video if necessary. Kazam is a great option for users who need to create screen recordings or capture screenshots with audio narration.
### 5. Deepin Screenshot
Deepin Screenshot is a lightweight and intuitive screenshot tool designed specifically for the Deepin Linux desktop environment. It offers a simple and efficient way to capture the entire screen or specific regions and apply basic editing operations.
### 6. GNOME Screenshot
GNOME Screenshot is the default screenshot tool included in the GNOME desktop environment. It’s straightforward and offers basic screenshotting capabilities, such as capturing the entire screen, active window, or rectangular selections.
### 7. ScreenCloud
ScreenCloud is a cloud-based screenshot tool that allows you to take screenshots remotely from any device. It offers a web interface and mobile apps to capture screenshots, annotate them, and share them with others securely.
### 8. ShareX
ShareX is a feature-rich screenshot tool that goes beyond just capturing images. It allows you to automatically upload screenshots to various platforms, add annotations, create GIFs, and even record your screen.
### 9. ImageMagick
ImageMagick is a command-line utility that provides a wide range of image manipulation functions, including screenshot capture. While it’s more technical than other tools, it offers extensive customization options and scripting capabilities.
### 10. GIMP
GIMP is a powerful open-source image editor that can also be used to capture screenshots. It offers a customizable interface, advanced editing tools, and the ability to create and manipulate screenshot images with precision.
| Tool | Features |
|—|—|
| Greenshot | Open-source, capture entire screen, selected windows, or regions |
| Flameshot | Open-source, user-friendly interface, customizable shortcuts |
| Shutter | Comprehensive, scheduling, keyboard shortcuts, advanced editing |
| Kazam | Screencasting and screenshotting, audio and video recording |
| Deepin Screenshot | Lightweight, intuitive, for Deepin Linux |
| GNOME Screenshot | Basic, capture entire screen, active window, rectangular selections |
| ScreenCloud | Cloud-based, remote screenshots, secure sharing |
| ShareX | Feature-rich, automatic uploads, annotations, screen recording |
| ImageMagick | Command-line tool, extensive customization, scripting capabilities |
| GIMP | Image editor, advanced editing tools, screenshot manipulation |
How to Take a Screenshot on Linux
Taking a screenshot on Linux is a simple process that can be done in a few different ways. The most common way to take a screenshot is to use the built-in screenshot tool, which can be accessed by pressing the “Print Screen” key on your keyboard. This will take a screenshot of the entire screen and save it to the clipboard. You can then paste the screenshot into an image editing program or other application.
If you want to take a screenshot of only a specific window or area of the screen, you can use the “gnome-screenshot” tool. To use this tool, press the “Alt” + “Print Screen” keys on your keyboard. This will open the “gnome-screenshot” tool, which you can use to select the area of the screen you want to capture. Once you have selected the area, click on the “Take Screenshot” button to save the screenshot to the clipboard.
There are also a number of third-party screenshot tools available for Linux. These tools typically offer more features than the built-in screenshot tool, such as the ability to annotate screenshots, add effects, and save screenshots in different formats.