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.
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
A short one-line output is possible with the -d
option:
$ lsb_release -d
How else can I see the operating system version? The content view is also suitable for this purpose
$ cat /etc/os-release
The hostnamectl
utility also displays basic information about the system, it shows the version and code name of the distribution:
$ hostnamectl
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
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:
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
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
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.