How to check Debian version running on your system

How to check Debian version can be done in multiple ways. We will have a look at 5 different ways to check which version of Debian you are running, or someone else.

5 ways on How to check Debian version

Method 1: lsb_release -a

This method will work no matter what Debian version you are running. It will give you Distro name, release and code name. Works on other linux distros as well.

ronny@skynet:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

If you don’t have the standard tools installed, you might need to install lsb-release. 

apt-get install lsb-release

Method 2: issue file

The issue file is an all Linux version and can be used not only for checking Debian version. Some Linux distros display the content of issue file when logging in.

ronny@skynet:~$ cat /etc/issue
Debian GNU/Linux 10 \n \l

As you can see this method doesn’t give you the point releases. It only shows the Major Debian release like 10, 9, 8 and so on.

Method 3: debian_version file

This file is of course only in Debian. When displaying the content of debian_version it will show major and point release. I often use this when checking which Debian version that is installed.

ronny@skynet:~$ cat /etc/debian_version

Method 4: os-release

The os-release file has only been around since Systemd came. So your Debian release needs to be newer than 2010 for this to work.

ronny@skynet:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION="10 (buster)"

As you can see it gives more information than the others above.

Method 5: hostnamectl

The hostnamectl gives you not only the Debian version, but also things like computer name, architecture, kernel version and some id’s.

ronny@skynet:~$ hostnamectl
   Static hostname: skynet
         Icon name: computer
        Machine ID: 23f14448894b403484c9e5b0c28ea118
           Boot ID: ff29a33d0b574cb098be5752181e5436
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-5-amd64
      Architecture: x86-64

Use the one you find the easiest or most comfortable using. It was just to show there are several ways on how to check Debian version.

Check out Debian official webpage for the installation files.

Struggling with slow ssh logins to your Debian System?

About Author

Related Posts

php8 gd

PHP8 gd Activate after installation

PHP8 GD activate after installation. GD doesn’t get activated by default. Not even a reboot after installation will activate it. So how do we do it? In…

Debian 12: linux-image-6.1.0-10amd64

Troubleshooting dependency issues in Debian 12: Resolving linux-image-6.1.0-10amd64 package dependency problems. If you installed the Debian 12 from the live image the issue is the raspi-firmware. Even…

OpenMediaVault default password

OpenMediaVault default password

OpenMediaVault default password is printed in the documentation. I did not see it the first time I installed it either. So I had to do some detective…

Debian change dns

Debian change DNS settings to a new DNS

Debian change DNS settings for speed improvement or privacy. It is really easy to do. So let us see how it’s done and get to it. The…

Upgrade debian 9 to debian 10

Upgrade Debian 9 to Debian 10

Upgrade Debian 9 to Debian 10 is very similar to upgrading previous versions. The only you need to do is change the sources to Buster instead of…

Debian 10 Static IP

Debian 10 Static IP

Debian 10 static IP works just like the previous version. They changed the naming of the network interfaces in Debian 9. However if you have upgraded from…

This Post Has One Comment

Leave a Reply