Being aware of your current Raspberry Pi OS version will help you know when it is time to update. It is important to know the version of your Raspberry Pi system, as new versions are released based on Debian’s release schedule, and new updates are issued all the time. Staying up to date will keep your Raspberry Pi secure and ensure that you have the newest software available. All Raspberry Pi models can run the same operating system, so updates are universal across all devices.
In this tutorial, you will see several methods that can be used to check the version of your Raspberry Pi. Keep in mind that Raspberry Pi OS is modeled after Debian, therefore versions include a number and a code name. The code names come from the Toy Story movie series. An example would be Debian 11 Bullseye (yes, it will say ‘Debian’ even though it is Raspberry Pi OS). The code names are just a fun nickname given to each release, with the version number actually being the best indicator of how old your Debian or Raspberry Pi version is.
In this tutorial you will learn:
- Several methods for checking Raspberry Pi OS version from command line
|Requirements, Conventions or Software Version Used
|Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
How to Check Raspberry Pi’s OS version
See some of the methods below to check your Raspberry Pi version. All accomplish the same task, and none require root permissions, so use whichever you find most convenient.
The Raspberry Pi OS is just a tweaked version of Debian Linux. Checking the version of your operating system will usually contain many references to Debian itself, since that is what is really running underneath.
- One of the simplest ways to see your Raspberry Pi OS version is with the
hostnamectlcommand. This is provided by systemd, which is standard across all editions of Raspberry Pi OS. Depending on your release, either the version or the release code name is revealed in the output.
- Another way to see this same information is by viewing the /etc/os-release file.
$ cat /etc/os-release
- Another way to see the version number is to execute the
lsb_releasecommand along with the
$ lsb_release -a
- Lastly, we can view the kernel version by using the
unamecommand. We will append the
-aoption to get the maximum amount of information.
$ uname -a
In this tutorial, we saw how to check the installed version of the Raspberry Pi OS. Knowing which version of Raspberry Pi OS you are on will help you determine when it is time to update. It is always a good idea to keep your Raspberry Pi system up to date, especially for the latest security patches and system features.