A quick tip for you today folks, to show you a few different ways to identify the Raspbian version you’re running on your Raspberry Pi.
I had to do a bit of troubleshooting recently as the latest version of Raspbian (Stretch) seemed to cause an issue with one of my SPI devices. My first step was to attempt to re-create the problem on an old version of Raspbian (Jessie), but I didn’t know which version each of my Pis were running.
After a few minutes of searching I found a range of different commands that all fetch information on your Raspbian version, and as always, I’m sharing what I learnt right here on my blog.
Here are your options:
The Uname method gives you the ability to choose what information you would like to display.
Use the command
man uname to see the available options:
Then enter the command with your chosen letter at the end. In the following image I’ve used
Cat Debian Version
If you’re only after the Debian version number, just enter the following command:
This will show just the version number on its own:
Cat Os Release
An option offering more comprehensive information is the os-release command, as follows:
This brings back most of the available information on your Raspbian version, however still lacks some of the detail of other options:
Cat Proc Version
I probably won’t use this option much, as I have to confess that I don’t really know some of the things it’s showing me. However if you’re more qualified than I am (doesn’t take much), you may find this command useful:
Here’s what it displays:
Last but not least, we have the lsb release option. It provides the version number and name in a clear and simple way, which is all I really needed for my SPI troubleshooting. Use the following command to try it yourself:
Here’s what mine looked like running Stretch 9.1:
Go Find Your Raspbian Version
That’s about it for today, just a short blog to share my findings from this evening’s Googling. Hopefully it’ll come in handy for you some day.
Now, time for me to fix that SPI display!
Until next time…