List of content you will read in this article:
Debian is one of the most popular Linux distributions. It is always a good option before working on any operating system to check its specification. Keep on reading this article to find out how to check Debian version via GUI and how to get the Debian version using command line. Debian has three types of releases actively maintained by its community. The three releases are:
- Stable - In this article, we consider the stable distribution of Debian version 9 (stretch), which is highly recommended for production environments.
- Testing - The preview distribution might become the next stable release containing the required packages that are not ready for stable release yet.
- Unstable - It is the distribution where most of the active development of Debian takes place.
Whenever you log into the Debian operating system, check what version of Debian has been installed on your system.
In this guide, we will be highlighting various methods to determine how to get Debian version or how to check Debian version on your operating system.
Methode 1: How To Check Debian Version using Command-Line?
Being one of the popularly used distributions of Linux- Debian also comes with the most interactive terminal where you can run commands for carrying out several tasks without any problem. Debian has a utility called the lsb_release that will help display the information regarding the available Linux distribution on the system. Here, the LSB represents the Linux standard base.
For using the lsb_release command, make sure that you install the LSB. Only after that will you print the required information about the system. Also, ensure that you have sudo access to run the desired command.
For installing LSB, run the following commands with the sudo access:
sudo apt update
sudo apt upgrade
sudo apt install lsb
In the above image, you can see that the package for LSB has been installed successfully. Now, as you have installed the LSB package, you can run the lsb_release command. You will get the desired information about the system. You can use the following syntax to use is:
If you want to get the list of all the options that can be used in conjunction with the lsb_release command, you can use this command along with the “-h” option, and it will open the documentation for this command.
Below are the available options-
- -h - it will display the help menu.
- -v - specifies the version that will display the LSB modules supported by the system.
- -i - it will display the present Linux distribution.
- -d - a description will display the detailed description of the Linux Distribution.
- -r - it will display the version of the distribution.
- -c - codename will display the codename of the distribution.
- -a - it will display all the information mentioned above.
- -s - it will display the output in a short format.
Suppose we run lsb_release along with the “-a” option as shown below; you will get the following output. Also, this method will work for any desktop environment or with any version of Debian. The check Debian version command is as follows:
No LSB modules are available
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
As per the above output, you can see that we have the Debian GNU/Linux 9.5 (stretch) version.
- Also, if you do not want to get the information in the above format, you can run the lsb_release command along with the “-d” option, as shown below:
Description: Debian GNU/Linux 9.5 (stretch)
Read the next section to learn how to get Debian version
Method 2: How to Get Debian Version using the /etc/issue file?
Debian has a /etc/issue file in its filesystem hierarchy that will hold the required information about the OS installed on your system. To get the details of this file, you can run the cat command on this file, as shown below:
$ cat /etc/issue
Debian GNU/Linux 9 \n \l
You can see that the installed version of Debian is GNU/Linux 9 (stretch).
Method 3: How to Check Debian Version using the /etc/os-release file?
Another simple way to check the installed version of Debian on your system is to execute the cat command on the file /etc/os-release that contains valuable information about the system, such as identification data and others.
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
Method 4: How to Check Debian Version using the hostnamectl command?
You can use the hostnamectl command to set the hostname for the system and check the installed version of Debian on your system. You can see the desired output as shown below.
Static hostname: debian9.localdomain
Icon name: computer-vm
Machine ID: a92099e30f704d559adb18ebc12ddac4
Boot ID: 4224ba0d5fc7489e95d0bbc7ffdaf709
Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 4.9.0-8-amd64
Methode 5: How to Check the Debian version using the uname command?
Another simple way for checking the installed Debian version is to use the “uname” command on your terminal. This command works similarly to the “ver” command used for MS-Dos systems. You can use the below syntax for the “uname” command.
Whenever you run the “uname” command without passing any parameters, you will only get the OS name but not the distribution, kernel-related information. But, by default, the command will take the “-s” option.
- There is a list of parameters that you can use with the “uname” command. This list is shown below. For this, you can use the “-help” option along with the “uname” command.
- If you want to check the version of the “uname” command, then you can use the “--version” parameter along with the “uname” command.
- For getting detailed information about the distribution, such as Kernel name, Domain, name (localhost.local Domain), Kernel version, and others, you can use the “-a” option along with the “uname” command.
- Also, you can combine different options for getting desired details about the system’s distribution.
Method 6: How to Check Debian Version from Graphical User Interface
If you prefer to view the Debian version via GUI instead of the command line, there are a few ways to do so, depending on your desktop environment.
If you are using GNOME, you can go to the System Information section by clicking on the Activities button and searching for System Information. Alternatively, you can open the Terminal application and type gnome-control-center to open the GNOME Control Center, then navigate to the Details section.
If you are using KDE, you can check the Debian version by going to the System Settings section and clicking on Details. This should display the Debian version along with other system information.
For other desktop environments, the steps may vary. However, most provide a System Information or System Settings section that should display the Debian version. If you cannot locate this information in the GUI, you can always fall back to the command line methods mentioned in other articles.
If you are a technical person, you might be aware of the simple commands that will help you get Debian version of the installed Debian distribution on your system. Knowing the version beforehand is good practice once you start using the system. It is beneficial to troubleshoot any issue or reach any root cause for that occurred issue. Also, it helps you while installing any package as you can look for the specific package that has compatibility with the installed Debian version.
You can go through the various methods to check Debian version. These are simple ways that even a beginner can implement. But make sure that you have sudo access to run the terminal commands to get the desired output. if you are looking to buy a Debian VPS, you can opt for monovm.com
People Are Also Reading: