What are the Methods for Checking Debian Version?

Debian is the oldest and most popular distribution of Linux used for d for development as well as for routine tasks. Due to its popularity, the development team of Debian is releasing the new versions of Debian after a specific time. 

Every new release comes with new features and updated versions of the applications such as Nano text editor, and GNOME. The most recent release of Debian is Debian Bookworm or Debian 12. 

Users can find out the version of the installed Debian on the computer and if they are using the oldest version, they can update it to the latest release. This blog will explain various ways to find out the version of installed Debian on the computer. 

How Can the Debian Version Be Found Out?

To find the installed version of Debian Linux on the computer, the following methods are used:

  1. Use hostnamectl Command
  2. Access the /etc/issue File
  3. Access the /etc/os-release File
  4. Use the lsb_release Command
  5. Use the Settings for Checking Debian Version
  6. Use the apt_cache Command
  7. Access the /etc/debian_version File

Method 1: Use hostnamectl Command

The hostnamectl is used to display the information of the hostname and allows users to make the changes in it using the terminal. This command can also be used to find out the version of the installed Debian as shown in the figure below:

$ hostnamectl

The version of the installed Debian is highlighted in the output of the hostnamectl command. 

Method 2: Access the /etc/issue File

Another method to view the version of the installed Debian is by displaying the information of the /etc/issue file. This file contains the system information displayed on the screen at the time of the computer’s login. 

The cat command can be used to display the contents of the /etc/issue file by running the command:

$ cat /etc/issue

Method 3: Access the /etc/os-release File

The /etc/os-release file contains the information of the operating system including its version and codename. To find out the information of the /etc/os-release, use the cat command:

$ cat /etc/os-release

The code name of the installed Debian is “Bookworm” and its version is 12 which is displayed in the output. 

Method 4: Use lsb_release Command

The lsb_release command is used to display the information of the Linux Standard Base and to display the version details of installed debian, use the “crid” option of this command:

$ lsb_release -crid

Method 5: Use the Settings for Checking Debian Version

For this method, open the “Settings” from the application’s menu:

Choose the “About” option from the menu and the version of the installed Debian is displayed:

Method 6: Use apt_cache Command

Use the apt-cache command with the show option to find the information of the base files with the execution of the following command:

$ apt-cache show base-files

The version details of installed Debian have been displayed on the screen.

Method 7: Access the /etc/debian_version File

The last and easiest method is to display the contents of the /etc/debian_version file using the cat command:

$ cat /etc/Debian_version

These are the eight ways to find out the installed version of Debian. 

Conclusion

For checking the Debian version, different commands such as hostnamectl can be executed as well as different files including the /etc/debian_version can be accessed. The lsb_release command and the apt_cache commands can also be used to display the installed version of Debian. 

The files /etc/issue and /etc/os_release also contained the version information of the Debian. Also, the settings application can be used to display the debian information.

All these methods are explained in this post for finding out the version of Debian Linux on the computer using the terminal as well as the Settings.