Follow MonoVM
on social networks
and stay updated
with our new posts.

instagram twitter linkedin Youtube facebook telegram
+370 5 205 5502

How to Check Debian Version? [Get Debian Version Command]

Are you looking into get Debian version command, or wanna check Debian version you are using? This blog post will help you to achieve your goal.

13 May, 22 by Susith Nonis 8 min Read

Debian is one of the most popular Linux distributions. It is always a good option before working on any operating system to check its specification. During this article, you will get to know how to check Debian version or how to get it with Debian version command. Debian has three types of releases actively maintained by its community. The three releases are-

  • Stable - In this article, we consider the stable distribution of Debian version 9 (stretch), which is highly recommended for production environments.
  • Testing - The preview distribution might become the next stable release containing the required packages that are not ready for stable release yet.
  • Unstable - It is the distribution where most of the active development of Debian takes place.

Whenever you log into the Debian operating system, check what version of Debian has been installed on your system. 

In this guide, we will be highlighting various methods to determine how to get Debian version or how to check Debian version on your operating system.

Methode 1: How To Check Debian Version using Command-Line?

Being one of the popularly used distributions of Linux- Debian also comes with the most interactive terminal where you can run commands for carrying out several tasks without any problem. Debian has a utility called the lsb_release that will help display the information regarding the available Linux distribution on the system. Here, the LSB represents the Linux standard base. 

For using the lsb_release command, make sure that you install the LSB. Only after that will you print the required information about the system. Also, ensure that you have sudo access to run the desired command.

For installing LSB, run the following commands with the sudo access.

sudo apt update
sudo apt upgrade
sudo apt install lsb

In the above image, you can see that the package for LSB has been installed successfully. Now, as you have installed the LSB package, you can run the lsb_release command. You will get the desired information about the system. You can use the following syntax to use is:

lsb_release [options]

If you want to get the list of all the options that can be used in conjunction with the lsb_release command, you can use this command along with the “-h” option, and it will open the documentation for this command.

lsb_release -h

Below are the available options-

1. -h - it will display the help menu.

2. -v - specifies the version that will display the LSB modules supported by the system.

3. -i - it will display the present Linux distribution.

4. -d - a description will display the detailed description of the Linux Distribution.

5. -r - it will display the version of the distribution.

6. -c - codename will display the codename of the distribution.

7. -a - it will display all the information mentioned above.

8. -s - it will display the output in a short format.

Suppose we run lsb_release along with the “-a” option as shown below; you will get the following output. Also, this method will work for any desktop environment or with any version of Debian.

lsb_release -a


No LSB modules are available
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch

As per the above output, you can see that we have the Debian GNU/Linux 9.5 (stretch) version.

  • Also, if you do not want to get the information in the above format, you can run the lsb_release command along with the “-d” option, as shown below.

lsb_release -d


Description: Debian GNU/Linux 9.5 (stretch)

It is another way to get Debian's version.

Methode 2: How to Get Debian Version using the /etc/issue file?

Debian has a /etc/issue file in its filesystem hierarchy that will hold the required information about the OS installed on your system. To get the details of this file, you can run the cat command on this file, as shown below.

$ cat /etc/issue


Debian GNU/Linux 9 \n \l

You can see that the installed version of Debian is GNU/Linux 9 (stretch).

Methode 3: How to Check Debian Version using the /etc/os-release file?

Another simple way to check the installed version of Debian on your system is to execute the cat command on the file /etc/os-release that contains valuable information about the system, such as identification data and others.

$ cat /etc/os-release


PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9 (stretch)"

Methode 4: How to Check Debian Version using the hostnamectl command?

You can use the hostnamectl command to set the hostname for the system and check the installed version of Debian on your system. You can see the desired output as shown below.



   Static hostname: debian9.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: a92099e30f704d559adb18ebc12ddac4
           Boot ID: 4224ba0d5fc7489e95d0bbc7ffdaf709
    Virtualization: qemu
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.0-8-amd64
      Architecture: x86-64

Methode 5: How to Check the Debian version using the uname command?

Another simple way for checking the installed Debian version is to use the “uname” command on your terminal. This command works similarly to the “ver” command used for MS-Dos systems. You can use the below syntax for the “uname” command.

uname [parameter]

Whenever you run the “uname” command without passing any parameters, you will only get the OS name but not the distribution, kernel-related information. But, by default, the command will take the “-s” option.


  • There is a list of parameters that you can use with the “uname” command. This list is shown below. For this, you can use the “-help” option along with the “uname” command. 

uname --help

  • If you want to check the version of the “uname” command, then you can use the “--version” parameter along with the “uname” command.

uname --version

  • For getting detailed information about the distribution, such as Kernel name, Domain, name (localhost.local Domain), Kernel version, and others, you can use the “-a” option along with the “uname” command.

uname -a

  • Also, you can combine different options for getting desired details about the system’s distribution.

uname -sr


If you are a technical person, you might be aware of the simple commands that will help you get Debian version of the installed Debian distribution on your system. Knowing the version beforehand is good practice once you start using the system. It is beneficial to troubleshoot any issue or reach any root cause for that occurred issue. Also, it helps you while installing any package as you can look for the specific package that has compatibility with the installed Debian version.

You can go through the various methods to check Debian version. These are simple ways that even a beginner can implement. But make sure that you have sudo access to run the terminal commands to get the desired output. if you are looking to buy a Debian VPS, you can opt for

People Are Also Reading:

Susith Nonis

I'm fascinated by the IT world and how the 1's and 0's work. While I venture into the world of Technology, I try to share what I know in the simplest way with you. Not a fan of coffee, a travel addict, and a self-accredited 'master chef'.