How to determine which Raspbian/Debian version is running on your Raspberry Pi

We all know that Raspberry Pi can run several types OS images, not just limited to Linux. But if you are a Raspbian user, sometimes you may wonder what Debian version you’ve and you want to figure it out for several reasons. Here, we present some of the methods for you to try.

Checking the /etc/issue file is the simplest way to find the the Debian version your raspberry is currently running on. To check that, type this;

pi@raspberrypi:~ $ cat /etc/issue
Raspbian GNU/Linux 8 \n \l

However, that command may not show the current Debian update point release. You can get more accurate info on this with the following command;

pi@raspberrypi:~ $ cat /etc/debian_version
8.0

Another method is to use the lsb_release command. Try this;

pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

If you don’t get any output, that probably means you need to install lsb_release. Try the below command to install it;

pi@raspberrypi:~ $ sudo apt-get install lsb-release
Reading package lists... Done
Building dependency tree
Reading state information... Done
lsb-release is already the newest version.
lsb-release set to manually installed.
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.

Once you install the above package run the lsb_release -a command again to see what Debian version you are running on your raspberry pi;

There is one more way find the info. Type the below command;

pi@raspberrypi:~ $ hostnamectl
Static hostname: raspberrypi
Icon name: computer
Chassis: n/a
Machine ID: 3882d14b5e8d408bb132425829ac6413
Boot ID: 36db77a14625470ba382444b3cdd1c33
Operating System: Raspbian GNU/Linux 8 (jessie)
Kernel: Linux 4.1.19-v7+
Architecture: arm

Since these commands are for Debian boxes, you can try these with other Debian distros as well.

Comment below what you think of this or check raspberrypi.stackexchange.com if you need a solution for your unique problems.

Happy coding!

Shamnad T

I love working with electronics, embedded specifically. I also have some experience in MATLAB and CAD software. Very much interested in Arduino and Raspberry Pi.

Recent Posts

10% Discount on Fee for BTech/BE Engineering Project Guidance

DIGX is offering 10% fee discount on Project Guidance registrations till August 31, 2016. Grab…

9 years ago

Register for your Embedded project and get FREE Arduino Kit

A golden reason for learning and completing your final year engineering project in DIGX is…

9 years ago

The new Raspberry Pi Model B+ arrived

The new devil There's a new sweet devil out for tech savvies, the new Raspberry…

10 years ago

Setting up Remote Desktop in Raspberry Pi – Part 4

Remote Desktop SSH is often all you need to control your Raspberry Pi, however sometimes…

11 years ago

Setting up and Automatically Connecting Wi-Fi on Raspberry Pi – Part 3

It's quite often that we use our RaspberryPi for some mobile applications like a robot…

11 years ago