How to Take a Screenshot on the Raspberry Pi

Zach Zach (248)
5 minutes

I write a lot of guides on howchoo and sometimes I need to show the reader what's on my Raspberry Pi's screen.

This short guide will teach you how to take Raspberry Pi screenshots, allowing you to capture screen grabs of whatever your Pi is currently displaying!

Note: This guide is only for the Raspberry Pi. Windows users can check out this guide on how to take a screenshot on PC.

Raspberry PiRaspberry Pi ×1

Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.

Connect to your Pi

Open your favorite command line program and log into your Raspberry Pi via SSH.

We're going to use the raspi2png library to take screenshots. I tested out several screen capture applications for the Raspberry Pi and this one consistently performed the best.

After logging into your Pi, download the project from the raspi2png Github repository:

git clone

Then, copy it to the usr/local/bin directory (or create an alias):

sudo cp -a raspi2png/raspi2png /usr/local/bin
Raspberry Pi Screenshot
This photo shows a sample screenshot I took! :)

To take a Raspberry Pi screenshot, run the following command:

raspi2png -p screenshot-name.png

I recommend creating a screenshots directory. I created one in ~/screenshots:

sudo mkdir ~/screenshots

Then, when you take a screenshot, you can either cd to that directory and run the screenshot command:

cd ~/screenshots
raspi2png -p screenshot-name.png

.. or, you can specify that directory when you run the command from anywhere:

raspi2png -p ~/screenshots/screenshot-name.png
RetroPie Kodi context menu item

As the name suggests, raspi2png outputs PNGS, which is generally the format you want for taking photos of text, menu systems, and retro games. PNG is a lossless format, so it's ideal for cases like this that have fewer colors, and won't result in any compression artifacts.

You can optionally specify width/height, compression level, which Raspberry Pi display to screenshot (in case you have a multi-monitor setup on your Pi.. for some reason), etc.

For example, if I wanted a smaller PNG (though lower quality), I could specify a higher compression level:

raspi2png -p screenshot-name.png -c 5

Options and their usage are documented in the raspi2png readme file.

Screen upside down? No problem.
Zach Zach (248)
2 minutes

So you've just finished setting up your Raspberry Pi touchscreen, and it's upside-down.