How to Know Which Raspberry Pi OS is Running? (Easiest way)

Don’t remember which operating system is installed on your Raspberry Pi? Or maybe you got it installed by someone else?
Today, I will show you how you can quickly find the version currently installed on your device.

The easiest way to get information about the OS running on a Raspberry Pi is to use the following command: cat /etc/os-release.
It displays the operating system name and version.

In this tutorial, I’ll show you how to use this command and read the results. I’ll also add a lot more information to help you identify what is running on your Raspberry Pi.

By the way, if you want to unlock all the secrets of the Raspberry Pi, you can check my e-book here. It’s a 30-day challenge, where you’ll learn everything from beginner to master. It includes many project guides to learn by practice.

I answer your questions - Raspberry...
I answer your questions - Raspberry Pi FAQ

Which operating system is running?

Download the Pi Glossary!
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!

There are many commands to find the Raspberry Pi OS version installed.
You can even deduct from the wallpaper or the Raspberry Pi model you use.
But the best way to get all the information is to run one command:

  • Open a terminal.
    If you are on a Desktop version, there is a shortcut in the toolbar, or under Accessories in the main menu.
    You can also connect to your Pi with SSH.
  • Type the following command:
    cat /etc/os-release
  • You should get something like this:
Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I'm here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.

In my case, the operating system installed is Raspbian (Raspberry Pi OS) in version 10 (aka Buster). This was the latest version available during writing.
There is a new version approximately every two years, so Raspbian 11 should be available soon.

The PRETTY_NAME gives you everything you need in one line.
The NAME is still Raspbian, even if the operating system has been renamed to Raspberry Pi OS recently. So, it’s the same thing.
The version and code-name correspond to the Debian ones, I will give you more details about this.

Update: Raspbian 11 is now available, and at least with some versions, the previous command won’t tell you it’s Raspberry Pi OS, it will only say “Debian”.

To make sure you’re running Raspberry Pi OS and not Debian, you can check this file:
cat /etc/apt/sources.list.d/raspi.list
If it exists, and includes the Raspberry Pi Foundation repository, you are on Raspbian, with the version specified at the end of the line:

In this example, I’m running Raspberry Pi OS Bullseye.

Raspberry Pi OS versions history

So, Raspberry Pi OS is based on Debian. Debian releases a new version every two years or so.
Each version increments the version ID and comes with a new code-name.
Here is a table with the Raspberry Pi OS version history to help you determine if the version you have is old or not.

Debian versionCodenameRelease Date
Raspberry Pi OS version history

For your information, not all versions are compatible with all Raspberry Pi models. For example, the Raspberry Pi 4 can run only on Raspberry Pi OS 10 or more, and the Raspberry Pi 3B+ requires Raspberry Pi OS 9 or 10, etc.
You can find all the details on Wikipedia.

If you want to update your system from Stretch to Buster for example, you need to update your repository list and upgrade your system:

  • Edit your apt sources:
    sudo nano /etc/apt/sources.list
  • Replace the version name with the latest one.
    For example, replace “stretch” with “buster”.
  • Save and exit.
  • Do a complete upgrade of your system:
    sudo apt update
    sudo apt full-upgrade

I explain everything in details in this article if you want to try: How to Upgrade Raspberry Pi OS to the Latest Version.

Master your Raspberry Pi in 30 days
Sale: 10% off today.
Download the eBook.
Uncover the secrets of the Raspberry Pi in a 30 days challenge.
Learn useful Linux skills and practice multiples projects.

There is also subversion ID for Debian, with regular major updates (bug fixes, security updates, etc.). If you are interested, you can get the exact version installed with:
cat /etc/debian_version
In my case, I got “10.7”, which was not the latest one.
If you are not up-to-date, you can upgrade it with:
sudo apt update
sudo apt upgrade

After that, the same command gives me 10.8 :).

Is my Raspberry Pi running a 64 or 32 bits OS?

So, we have seen how to determine which Raspberry Pi version is installed, but you can also look for other details. For example, the previous commands don’t tell you if you are running a 32 or 64 bits version.

To get the current architecture used on your device, you can run this command:
uname -m

You’ll get something like:

  • If it’s ARMv3 to v7: You are running a 32 bits operating system
  • ARMv8 or aarch64: You are on a 64 bits operating system

If your Raspberry Pi model is compatible with a 64 bits architecture, you can download a 64 bits image from there. For now, The Raspberry Pi Foundation doesn’t include this version on their website and Raspberry Pi Imager.
It’s probably because it’s still in beta. You can try it, but expect a few bugs and stability issues.

Support me: Join the community on Patreon to show your support, get behind-the-scenes content and other awesome perks!

What if it’s not Raspberry Pi OS?

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

As you probably know, Raspberry Pi OS (ex Raspbian), it’s not the only operating system that can run on Raspberry Pi. By the way, you can check my 15 favorite operating systems here.

Master Python on Raspberry Pi
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.

So, if the previous commands don’t work, or don’t include a Raspberry Pi OS version, it’s probably because you are on a different operating system.
If you are on a Debian-like OS, it shouldn’t be an issue, as the command will work and give you all the required information.

For example, the os-release file on Ubuntu contains something like:
VERSION="18.04.4 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04.4 LTS"

Debian, DietPi, Kali Linux, etc. should also be pretty easy to identify.
But, to be sure you find the solution in this post, I will give you a few other commands you can try to find the exact OS version:

  • LSB Release: print information about the running distribution.
    For example, on Debian:
    lsb_release -a
    It displays shomething like:
    No LSB modules are available.
    Distributor ID: Debian
    Description: Debian GNU/Linux 9.13 (stretch)
    Release: 9.13
    Codename: stretch
  • Kernel version: displays system information.
    uname -a
    You’ll get a bunch of information like:
    Linux raspberrypi 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l GNU/Linux
    So, it includes the host name, the kernel version, the release date and the architecture.
    It should be useful to find some clues about your system.


That’s it, I hope you found your answer in this article. Most of the time, Raspberry Pi runs on Raspberry Pi OS, so it should be pretty easy to find the exact version with the information I gave you.

For other operating systems, it might be tricky. As I can’t test all of them, it’s difficult to give you a solution that will work in any case.
If you still have a question, feel free to leave a comment below, so that I can try to help you.

This tutorial doesn't work anymore? Report the issue here, so that I can update it!

5 1 vote
Article Rating

Patrick Fromaget

I'm the lead author and owner of My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
1 year ago

At one point the article gives a command that does not work
cat /etc/os/release
Later corrected to
cat /etc/os-release

cat /etc/debian/version
does not work.
The correct command is
cat /etc/debian_version

20 days ago

Article need to be updated, on raspi-os :

cat /etc/os-release 


PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION="11 (bullseye)"

We are not able to now it’s raspi-os like this…

But you can trust:

cat /etc/apt/sources.list

and you get:

deb bullseye main contrib non-free
deb bullseye-security main contrib non-free
deb bullseye-updates main contrib non-free
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src bullseye main contrib non-free
#deb-src bullseye-security main contrib non-free
#deb-src bullseye-updates main contrib non-free

Recent Posts

Master your Raspberry Pi - 10% off