How to Check the Debian Linux Version

Published August 23, 2024

How to find the version of Debian GNU/Linux How to find the version of Debian

Debian is my favorite flavor of Linux and I've been using it for 24 years.

Three Releases of Debian

There are three active releases of Debian.

The most recent release is always called Stable. Right now, the most current stable distribution of Debian is 12, also codenamed bookworm. This is the production release.

The Testing release contains packages that have not been accepted into a Stable release yet, but are in the queue. This usually has more recent versions of software. The most current testing distribution of Debian is codenamed trixie.

The Unstable release is where the active development of Debian happens. This contains cutting edge versions of packages and is not recommended for production use. The current unstable distribution of Debian is always called sid.

If you are using Debian GNU/Linu and want to find out which version it is, there are many ways to find out.

Versions of Debian

There are 12 versions of Linux. There are many ways to find the versions. We will check them all.

For the examples, I will use my Debian 11 vm and run these commands.

Using the hostnamectl command

The hostnamectl command shows the OS name, kernel and whether this was run on a virtual machine. Run this command:

arul@arulbian:~$ hostnamectl
   Static hostname: arulbian
         Icon name: computer-vm
           Chassis: vm
        Machine ID: d07976c022d84aacb52cc06df9b22974
           Boot ID: 8a704cf429444947b7f15fdefae39ee2
    Virtualization: oracle
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.10.0-21-amd64
      Architecture: x86-64

As you can see, it printed the version number next to Operating System.

Debian GNU/Linux 11 (bullseye)

Reading the /etc/os-release text file

The /etc/os-release file is a text file that contains operating system information as well as more version-specific information. View the contents using the cat command.

arul@arulbian:~$ cat /etc/os-release 
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 see a few extra VERSION_ keys that show version numbers and codenames.

VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye

Using the lsb_release command

The lsb_release command displays limited operating system information as well as version-only information.

To display all OS name and code name:

arul@arulbian:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

To display only the OS version:

arul@arulbian:~$ lsb_release -r
Release:    11

Reading the /etc/issue file

If you view the contents of the /etc/issue file, you will see the OS name and version.

arul@arulbian:~$ cat /etc/issue
Debian GNU/Linux 11 \n \l

Reading the /etc/debian_version file

If you view the contents of the /etc/debian_version file, you will see the Debian version, including the subversion. That's all.

arul@arulbian:~$ cat /etc/debian_version
11.6

Here, the version is 11.6.

Extra packages and tools

There are extra command line and GUI packages and tools that help you find the version of Debian. But I would like to keep this post limited to whatever we already have installed and comes with the operating system by default.

Conclusion

If this helped you for your Debian version, or you have questions, feel free to ask in the comments or you can email me. Thanks for reading.

Related Posts

If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.

Disclaimer: Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website.

Last Updated: August 23, 2024.     This post was originally written on August 08, 2024.