raspberry pi os version running

How To Quickly Identify Which OS Is Running On Raspberry Pi

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.

As a general rule, the Linux distribution name and version are mentioned in the /etc/os-release file. If the command “raspi-config” is installed, then it’s Raspberry Pi OS, and the version is included in the “About” section.

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.

How to know which Raspberry Pi OS is installed?

The fastest way to know which operating system is installed on a Raspberry Pi is to check the content of the /etc/os-release file. It includes the system name and version in an easy-to-read 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:

In this example, it tells me that I’m running Debian 12 (aka Bookworm).
But I know I’m using Raspberry Pi OS and not the real Debian release, so it doesn’t work all the time. Since Bullseye, it’s no longer mentioned Raspbian here (which was the case previously).

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 Raspberry Pi OS, with the version specified at the end of the line:

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

So, in this example, I’m running Raspberry Pi OS Bookworm.

I know it’s a bit confusing with Raspberry Pi OS because it’s so close to the original Debian distribution, but you these two commands should be enough to know for sure which OS and version you use.

Raspberry Pi OS versions history

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.

Join Our Community!

Connect, learn, and grow with other Raspberry Pi enthusiasts. Support RaspberryTips and enjoy an ad-free reading experience. Get exclusive monthly video tutorials and many other benefits.

Learn more
Debian versionCodenameRelease Date
7Wheezy2013-09-27
8Jessie2015-09-28
9Stretch2017-08-17
10Buster2019-07-10
11Bullseye2021-11-08
12Bookworm2023-06-10
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 “bullseye” with “bookworm”.
  • 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.

There are also subversion IDs 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 “11.4” while writing this article, 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 11.5 :).

Are you a bit lost in the Linux command line? Check this article first for the most important commands to remember and a free downloadable cheat sheet so you can have the commands at your fingertips.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Is your 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 push this version by default on their website and Raspberry Pi Imager because it’s not compatible with all models.

But if you have a Raspberry Pi 3B+ or more recent, you can use it. There are still a few bugs, but overall, it works pretty well.

If you are a bit lost with all these versions, you should probably read my other article on the topic: Raspberry Pi OS Versions: All Your Questions Answered

And I also have another one focusing on the differences between the 32-bit and 64-bit versions (especially what you can expect from each one): Raspberry Pi OS 64-bit vs 32-bit (Which One To Install?)

Note: There is another way to find out if you’re using a 64 or 32 bits edition. This command is particularly useful in scripts, as it simply returns 32 or 64:
getconf LONG_BIT

Other commands you can try if it’s not Raspberry Pi OS

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.

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:
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

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.

Tutorial on the same topic: How to Easily Identify Your Linux Distribution (GUI & CLI)

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Have a GUI? Use it to identify the installed OS

If you have a graphic interface, you can often quickly find which distribution you are using. Here is for example, a video with the 4 most popular systems that you can use on Raspberry Pi. See if it looks like yours:

You can often get some info in the settings, under “About” or something like that.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

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

If you are looking for exclusive tutorials, I post a new course each month, available for premium members only. Join the community to get access to all of them right now!

Conclusion

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 in the community, so that I can try to help you.

Whenever you’re ready, here are other ways I can help you:

The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

Similar Posts

4 Comments

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

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

  2. Article need to be updated, on raspi-os :

    cat /etc/os-release 
    

    give

    PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
    NAME="Debian GNU/Linux"
    VERSION_ID="11"
    VERSION="11 (bullseye)"
    VERSION_CODENAME=bullseye
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    

    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 http://deb.debian.org/debian bullseye main contrib non-free
    deb http://security.debian.org/debian-security bullseye-security main contrib non-free
    deb http://deb.debian.org/debian bullseye-updates main contrib non-free
    # Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://deb.debian.org/debian bullseye main contrib non-free
    #deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
    #deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
    
    1. Thanks for the update.
      In fact, you can’t say if it’s Debian or Raspberry Pi OS based on the sources.list.
      But on Raspberry Pi, you should have this file:

      cat /etc/apt/sources.list.d/raspi.list

      giving something like:

      deb http://archive.raspberrypi.org/debian/ bullseye main
      # Uncomment line below then 'apt-get update' to enable 'apt-get source'
      #deb-src http://archive.raspberrypi.org/debian/ bullseye main

Comments are closed.