Methods of payment Abuse

Finding the Debian version: all the ways

20.10.2022, 12:28

We have gotten used to having a new version of Debian every few years. When a new version is released, users usually wonder what repositories will work? What versions of programs will work?

It all depends on the version of the system in the first place. If you installed the OS yourself, you should know what version is installed. If not, you will learn how to find out the version of Debian using the console or the GUI.

Finding the version of Debian

The first thing to remember is that the version number is not as important as the name by which repositories will be added.

The fastest way to look up the Debian version is to use lsb_release with the -a option. This displays LSB information about the installed distribution:

$ lsb_release -a

как узнать версию Debian

A short one-line output is possible with the -d option:

$ lsb_release -d

узнаем версию Debian

How else can I see the operating system version? The content view is also suitable for this purpose

$ cat /etc/os-release

как узнать версию Debian

The hostnamectl utility also displays basic information about the system, it shows the version and code name of the distribution:

$ hostnamectl

версия Debian

In the following way you can check the version, but not the code name (this is available in the /etc/issue file):

$ cat /etc/issue

как узнать версию Debian

The system has /etc/debian_version which shows the Debian version including the point release version:

$ cat /etc/debian_version

To view the Debian version in the GUI, use the program hardinfo. It is installed with the following command:

$ sudo apt install hardinfo

After running the utility from the main menu and finding the distribution version under Computer -> Operating System:

версия Debian

Sometimes it becomes necessary to determine the Debian kernel version. The uname command, which is standard for all distributions, can be used for this purpose:

$ uname -a

как узнать версию Debian

Also in Debian you can use one of the three available repositories: Stable, Testing, Unstable.

To understand which repository is used on your system, open the /etc/apt/sources.list file:

$ cat /etc/apt/sources.list

узнаем версию Debian

Next you should find a line like this:

deb http://deb.debian.org/debian/ buster main contrib non-free

Now look at the word that comes after the repository URL. If it's buster, it's a stable release. If it's testing, you have a version that will be stable on the next release. If it's unstable, it's an unstable repository.