Home Reference Raspberry Pi: Identify Linux distribution and release

Raspberry Pi: Identify Linux distribution and release

by shedboy71

Read Linux distribution and release

You can use “/ etc / os-release”  to retrieve  information about the installed Linux distribution and the release

cat /etc/os-release

This is what I saw

[codesyntax lang=”bash”]

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

[/codesyntax]

You can also use cat /etc/issue to retrieve the name and version number

cat /etc/issue

This is what I saw

[codesyntax lang=”bash”]

Raspbian GNU/Linux 10 \n \l

[/codesyntax]

Read Linux kernel version

uname -a

This is what I saw

[codesyntax lang=”bash”]

Linux raspberrypi 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux

[/codesyntax]

You can see the version number of the Linux kernel that comes in the third position – 5.4.79-v7l+.

The processor architecture on which Raspberry Pi runs. Recognizable in the output from my Raspberry Pi 4 as “armv71”, other Raspberry Pi hardware may return a different architecture.

If you only want the kernel version

uname -r

This is what I saw

[codesyntax lang=”bash”]

5.4.79-v7l+

[/codesyntax]

You can also use the following

ucat /proc/version

This is what I saw

[codesyntax lang=”bash”]

Linux version 5.4.79-v7l+ (dom@buildbot) (gcc version 8.4.0 (Ubuntu/Linaro 8.4.0-3ubuntu1)) #1373 SMP Mon Nov 23 13:27:40 GMT 2020

[/codesyntax]

pi os info

pi os info

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More