- How to Check Debian Linux Version
- Checking Debian Version Using lsb_release Command
- Checking Debian Version using the /etc/issue File
- Checking Debian Version using the /etc/os-release File
- Checking Debian Version using hostnamectl Command
- Как проверить версию Debian Linux
- Проверка версии Debian из командной строки
- Проверка версии Debian с помощью файла /etc/issue
- Проверка версии Debian с помощью файла /etc/os-release
- Проверка версии Debian с помощью команды hostnamectl
- Выводы
- How to Check Which Debian Version are you Running
- How to check Debian version?
- Other methods to show Debian version
- How to Check your Debian Linux Version
- Checking Debian Version from the Command Line #
- Checking Debian Version using the /etc/issue file #
- Checking Debian Version using the /etc/os-release file #
- Checking Debian Version using the hostnamectl command #
- Conclusion #
How to Check Debian Linux Version
It’s quite often that we keep forgetting which version of the Debian operating system we are using and this mostly happens when you log in to the Debian server after a long time or are you looking for a software that is available for a specific version of Debian only.
Or it may also happen when you are using few servers with multiple versions of the operating system and may not be necessary to remember which version of Debian is installed on which system. There may be many other reasons.
In this article, we will explain to you several ways to find out the Debian version installed on your system.
Checking Debian Version Using lsb_release Command
The lsb_release command displays certain LSB (Linux Standard Base) information about your Linux operating system and it is the preferred way to check the installed version of your Debian system.
From the output above, I am using Debian GNU/Linux 10 (buster) as shown in the Description line.
That’s not the only way, there are several other ways to find out the installed Debian version as explained below.
Checking Debian Version using the /etc/issue File
The /etc/issue is a text file that holds a message or system identification information, you can use the cat command to print the contents of this file.
$ cat /etc/issue Debian GNU/Linux 10 \n \l
The above command only shows the Debian version number, if you want to know the current Debian update point releases, use the following command, it will also work on the older version of Debian releases.
$ cat /etc/debian_version 10.1
Checking Debian Version using the /etc/os-release File
The /etc/os-release is a new configuration file introduced in systemd, which contains system identification data, and only available in newer Debian distributions.
Checking Debian Version using hostnamectl Command
The hostnamectl command is used to set or change system hostname and related settings, but you can use this command to check the Debian version along with the kernel version.
That’s all! In this article, we have explained several ways to check which Debian version you are running on the system. Which command did you found useful? do share with us in the comments.
Как проверить версию Debian Linux
Когда вы входите в систему Debian Linux в первый раз, перед выполнением какой-либо работы всегда рекомендуется проверить, какая версия Debian работает на машине.
Всегда активно поддерживаются три выпуска Debian:
- Стабильный — последний официально выпущенный дистрибутив Debian. На момент написания этой статьи текущим стабильным дистрибутивом Debian была версия 9 (stretch). Это версия, рекомендованная для производственных сред.
- Тестирование — предварительный выпуск, который станет следующим стабильным выпуском. Он содержит пакеты, которые еще не готовы к стабильному выпуску, но находятся в очереди на это. Этот выпуск постоянно обновляется, пока он не будет заморожен и не выпущен как стабильный.
- Нестабильный , всегда под кодовым названием sid — это дистрибутив, в котором идет активная разработка Debian.
В этом руководстве мы покажем несколько различных команд, как проверить, какая версия Debian Linux установлена в вашей системе.
Проверка версии Debian из командной строки
Утилита lsb_release отображает информацию LSB (Linux Standard Base) о дистрибутиве Linux.
Предпочтительный метод проверки вашей версии Debian — использовать утилиту lsb_release которая отображает информацию LSB (Linux Standard Base) о дистрибутиве Linux. Этот метод будет работать независимо от того, какую среду рабочего стола или версию Debian вы используете.
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.5 (stretch) Release: 9.5 Codename: stretch
Ваша версия Debian будет показана в строке описания. Как видно из вывода выше, я использую Debian GNU / Linux 9.5 (stretch).
Вместо того, чтобы печатать всю вышеуказанную информацию, вы можете отобразить строку описания, в которой указана ваша версия Debian с параметром -d .
Результат должен выглядеть примерно так:
Description: Debian GNU/Linux 9.5 (stretch)
Кроме того, вы также можете использовать следующие команды, чтобы проверить свою версию Debian.
Проверка версии Debian с помощью файла /etc/issue
Следующая команда cat отобразит содержимое файла /etc/issue который содержит текст идентификации системы:
Результат будет выглядеть примерно так:
Проверка версии Debian с помощью файла /etc/os-release
/etc/os-release — это файл, содержащий идентификационные данные операционной системы, и его можно найти только в новых дистрибутивах Debian, работающих под управлением systemd.
Этот метод будет работать, только если у вас Debian 9 или новее:
Результат будет выглядеть примерно так:
PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"
Проверка версии Debian с помощью команды hostnamectl
hostnamectl — это команда, которая позволяет вам установить имя хоста, но вы также можете использовать ее для проверки вашей версии Debian.
Эта команда будет работать только в Debian 9 или более новых версиях:
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
Выводы
В этом руководстве мы показали вам, как найти версию Debian, установленную в вашей системе. Для получения дополнительной информации о выпусках Debian посетите страницу выпусков Debian .
Не стесняйтесь оставлять комментарии, если у вас есть вопросы.
How to Check Which Debian Version are you Running
Wondering which Debian version are you running? This tutorial teaches you several ways to check Debian version in the terminal.
Which Debian version am I running? You need the answer in situations such as when you are looking for a software that is available for certain Debian version only.
Knowing Debian version is helpful in many situations. Here’s how to do it.
How to check Debian version?
The simplest way you can check Debian version is using the lsb_release command:
[email protected]:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
I am running Raspbian OS which is Debian customized for Raspberry Pi. As you can see, I am running Debian 10 Buster here.
The lsb_release is my favorite command as it can be used to check the version of most Linux distribution (if not all). For example, you can use it to check CentOS version as well.
But that’s not the only way. There are other commands to find Debian version in Linux terminal.
Other methods to show Debian version
Do you recall the Linux directory structure? The /etc directory has the core configuration files and you can use them to find a lot of useful information about your system including the distribution version number.
Here are two ways to do that:
[email protected]:~ $ cat /etc/issue Raspbian GNU/Linux 10 \n \l
The above command output shows that I am running Raspbian GNU Linux 10. If you don’t like the way this output is presented, you can use this method to get just the version number of Debian.
[email protected]:~ $ cat /etc/debian_version 10.0
But this one misses other crucial information. This is why recommend reading the dedicated file for this purpose:
Its output will show you a number of information like version umber, the code name and the project related URLs.
[email protected]:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Another evergreen way is to use systemd command hostnamectl. It’s mainly used for managing the hostname but you can also use it to get Debian version along with the kernel version.
You can see the Debian version under the Operating System line.
[email protected]:~ $ hostnamectl Static hostname: raspberrypi Icon name: computer Machine ID: 0035faf761f945b8923fc7d54632a941 Boot ID: 6de8d489b3a24b6996bd08c9992a6de3 Operating System: Raspbian GNU/Linux 10 (buster) Kernel: Linux 4.19.29-v7l+ Architecture: arm
So, you just saw five ways to check Debian version. Which command did you like the most? Let me know in the comments.
Creator of Linux Handbook and It’s FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries from Agatha Christie and Sherlock Holmes to Columbo & Ellery Queen.
How to Check your Debian Linux Version
When you log in to a Debian Linux system for the first time, before doing any work it is always a good idea to check what version of Debian is running on the machine.
Three releases of Debian are always actively maintained:
- Stable — The latest officially released distribution of Debian. At the time of writing this article, the current stable distribution of Debian is version 9 (stretch). This is the version that is recommended for production environments.
- Testing — The preview distribution that will become the next stable release. It contains packages that are not ready for stable release yet, but they are in the queue for that. This release is updated continually until it is frozen and released as stable.
- Unstable, always codenamed sid — This is the distribution where the active development of Debian is taking place.
In this tutorial, we’ll show several different commands on how to check what version of Debian Linux is installed on your system.
Checking Debian Version from the Command Line #
The lsb_release utility displays LSB (Linux Standard Base) information about the Linux distribution.
The preferred method to check your Debian version is to use the lsb_release utility which displays LSB (Linux Standard Base) information about the Linux distribution. This method will work no matter which desktop environment or Debian version you are running.
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.5 (stretch) Release: 9.5 Codename: stretch
Your Debian version will be shown in the Description line. As you can see from the output above I am using Debian GNU/Linux 9.5 (stretch).
Instead of printing all of the above information you can display the description line which shows your Debian version passing the -d switch.
The output should look similar to below:
Description: Debian GNU/Linux 9.5 (stretch)
Alternatively, you can also use the following commands to check your Debian version.
Checking Debian Version using the /etc/issue file #
The following cat command will display the contents of the /etc/issue which contains a system identification text:
The output will look something like below:
Checking Debian Version using the /etc/os-release file #
/etc/os-release is a file which contains operating system identification data, and can be found only on the newer Debian distributions running systemd.
This method will work only if you have Debian 9 or newer:
The output will look something like below:
PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"
Checking Debian Version using the hostnamectl command #
hostnamectl is a command that allows you to set the hostname but you can also use it to check your Debian version.
This command will work only on Debian 9 or newer versions:
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
Conclusion #
In this guide, we have shown you how to find the version of Debian installed on your system. For more information on Debian releases visit the Debian Releases page.
Feel free to leave a comment if you have any questions.