How to Check OS Version on Debian 12?


Debian OS is maintained in three versions/releases, i.e., stable, testing, and unstable. The unstable version is under continuous development. On the other hand, the testing version is tested and updated repeatedly till it is updated to a stable version. The Stable version is the official distribution and is fully tested. It is released publicly every 2 years. The current stable version of Debian is 12 with code name bookworm.

This article will demonstrate the following ways to check the Operating System (OS) version on Debian 12 (Bookworm) systems:

 

How to Check the OS Version on Debian 12 Via CLI?

There are multiple ways to check the OS Version on Debian 12 systems via the Command Line Interface (CLI). CLI offers various ways to determine the operating system version. A user can either check the OS version via the hostnamectl and lsb_release command and /etc/os-release, /etc/debian_version, /proc/version, and /etc/issue files in the following sections:

hostnamectl Command

The hostnamectl command returns the hostname with system-related information including the OS version, that is displayed by running the following command:

hostnamectl

The above output indicates that the OS version is 12.

 

/etc/os-release File

The os-release file stores the Operating System’s identification data, such as name, version, codename, ID, URL, etc., To check the OS version, use the cat command to read the os-release file by executing the following command:

cat /etc/os-release

/etc/debian_version File

The debian_version file in the etc directory file just contains the OS version and the current update point release, which can be checked by running the command below:

cat /etc/debian_version

The above output indicates that the OS version is 12 and the current update point release is 2.

lsb_release Command

The lsb_release command returns details about the installed distribution, such as distribution ID, description, release, and code is returned by. In this section, the OS version of Debian is checked via variations in the lsb_release command.

To check all distribution-specific information, the “a” flag is used with the lsb_release command as follows:

 

lsb_release -a

Note: The “d” flag and the “r” flag filter out the description and the release number of the installed OS from the lsb_release command as shown below:

lsb_release -d

lsb_release -r

/proc/version File

The version file in the proc directory contains data related to the Linux kernel and installed distribution. By reading the /proc/version via the cat command, check the OS version with the current update point release by the command below:

cat /proc/version

/etc/issue File

The issue file in the etc directory includes the OS name with the OS version, which can be checked by executing the command below:

cat /etc/issue

 

How to Check the OS Version on Debian 12 via GUI?

GUI (Graphical User Interface) is more convenient for new Linux users, who are reluctant to use Linux Terminal. A user can either check the OS version via the GNOCME Settings or use any third-party tool on the Debian repositories.

Using GNOME Settings

Open the Settings and access the About section (in the left pane). Next locate the OS Name, which displays the OS name and version as shown below:

The Debian version is 12.

Note: The method discussed in this section, demonstrated the way to check the OS Version on the GNOME desktop environment. If a user is using any other desktop environment, the location of the OS Version may be different.

Using the Hardinfo Tool

Alternatively, a tool hardinfo (Hardware Information) is also used to view hardware-related and system-related information in Debian via GUI.

First, install hardinfo by executing the following command:

sudo apt install hardinfo

To launch hardinfo, search “hardinfo” from the applications menu and click the “System Profiler” icon:

Next, Click the “Operating System” under “Computer” to find the current OS version:

Conclusion

The OS version can be checked by many ways. By CLI, the OS version is checked by accessing /etc/os-release, /etc/debian_version, /proc/version, and /etc/issue files as well as via the hostnamectl and lsb_release command. By GUI, the OS version is checked via the GNOME Settings and the hardinfo tool. This article demonstrated eight (8) different ways to check the Operating System (OS) version on Debian 12 (Bookworm) systems.

Print Friendly, PDF & Email