How to Take a Screenshot in Linux
In this article
To take a screenshot in Linux, press PrtSc to capture the entire screen, Shift+PrtSc to select an area, or Alt+PrtSc for the active window. The image is saved to your Pictures folder by default. Most desktop environments include a screenshot tool, and you can also use the gnome-screenshot or scrot commands in the terminal. This guide covers the built-in methods for GNOME, KDE, and Xfce, plus command-line options.
What You'll Need
- A Linux desktop environment (GNOME, KDE Plasma, Xfce, or similar) with a graphical session.
- A keyboard with a PrtSc (Print Screen) key. If your keyboard lacks one, you can use the on-screen keyboard or remap a key.
- Optional: a terminal emulator for command-line methods.
Step-by-Step
- Take a full-screen screenshot: Press the PrtSc key. The screen will flash briefly, and the screenshot will be saved to
~/Pictures(or~/Screenshotson some systems) with a timestamped filename. - Capture a specific area: Press Shift+PrtSc. Your cursor will change to a crosshair. Click and drag to select the area you want, then release the mouse button. The selection is saved immediately.
- Capture the active window: Click on the window you want to capture to make it active, then press Alt+PrtSc. Only that window is captured.
- Copy to clipboard instead of saving: If you want to paste the screenshot directly into an image editor or document, hold Ctrl while pressing the shortcut (e.g., Ctrl+PrtSc for full screen, Ctrl+Shift+PrtSc for area). The image is placed on the clipboard.
- Use the GNOME Screenshot GUI: Press the Super (Windows) key and type "Screenshot" to open the Screenshot app. Choose between Selection, Screen, or Window, set a delay if needed, and click the camera icon to capture.
- Use the KDE Spectacle tool: In KDE Plasma, press PrtSc to open Spectacle. You can select the region, window, or full screen, annotate, and save or copy the image.
- Use the Xfce Screenshot app: In Xfce, press PrtSc to open the screenshot dialog. Choose the region, window, or full screen, and set a delay if needed.
- Use the command line with
gnome-screenshot: Open a terminal and typegnome-screenshotfor the GUI, orgnome-screenshot -f /path/to/file.pngto save directly. Use-afor area selection,-wfor window, and-d 5for a 5-second delay. - Use
scrotfor more control: Install scrot with your package manager (e.g.,sudo apt install scroton Debian/Ubuntu). Then runscrot /path/to/file.pngfor full screen,scrot -sfor area selection, andscrot -ufor the focused window.
Common Mistakes
- Pressing PrtSc and nothing happens: Some window managers or minimal setups don't bind the key by default. Try using the GUI tool or the command line instead.
- Screenshots not saving: If the Pictures folder doesn't exist, the screenshot may fail silently. Create it with
mkdir -p ~/Pictures. - Area selection not working: If you're on Wayland, some tools may not support area selection. Use the built-in GNOME screenshot tool or switch to Xorg if needed.
- Capturing the wrong window: With Alt+PrtSc, ensure the target window is focused (click on it) before pressing the shortcut.
Tips
- Use a delay if you need to open a menu or hover over something before capturing:
gnome-screenshot -d 3waits 3 seconds. - For quick sharing, copy to clipboard (Ctrl+PrtSc) and paste directly into chat apps or email.
- On Wayland, the built-in tools are more reliable than third-party ones that rely on X11.
- If you need to capture a scrolling webpage, use a browser extension or a dedicated tool like Flameshot (install via your package manager).
- Set a custom shortcut in your desktop settings to launch your favorite screenshot tool.
Troubleshooting
If the screenshot does not appear where expected:
- Check your home directory for a
PicturesorScreenshotsfolder. If it's missing, create it and try again. - Look for a notification or a flash on the screen. Some tools show a preview or a notification with the save location.
- If using a custom tool, check its settings to see where it saves files.
If the PrtSc key does nothing:
- Try the GUI tool: search for "Screenshot" in your app menu.
- Open a terminal and run
gnome-screenshot(orspectacleon KDE,xfce4-screenshooteron Xfce) to see if the tool launches. - If the terminal command fails, install the tool:
sudo apt install gnome-screenshot(or your distro's equivalent). - If the key is not mapped, go to Settings > Keyboard > Custom Shortcuts and add a new shortcut that runs the command.
If the screenshot is black or blank:
- This often happens with hardware acceleration or on Wayland with certain drivers. Try using the built-in tool instead of a third-party one.
- Switch to Xorg by logging out and choosing the session type at login, if available.
If you get a "Failed to capture" error:
- Make sure you have write permission to the target directory.
- Try saving to a different location, e.g.,
gnome-screenshot -f /tmp/test.png.
Frequently Asked Questions
Where are screenshots saved by default?
Most desktop environments save to ~/Pictures or ~/Screenshots. You can change this in the screenshot tool's settings.
Can I take a screenshot of a specific monitor in a multi-monitor setup?
Yes, with the GNOME Screenshot GUI you can select the monitor from the "Screen" dropdown. With gnome-screenshot, use the --display option or select the area manually.
How do I take a screenshot of the login screen?
This is not possible from within the session. You can take a photo of the screen or use a virtual machine with a screenshot tool.
What's the difference between PrtSc and Shift+PrtSc?
PrtSc captures the whole screen, while Shift+PrtSc lets you select a rectangular area.
How do I take a screenshot from the terminal?
Use gnome-screenshot or scrot. For example, scrot myimage.png saves a full-screen screenshot to the current directory.
Can I take a screenshot without a PrtSc key?
Yes, use the GUI screenshot app from your application menu, or set a custom keyboard shortcut in your desktop settings.