In this tutorial, we will show you how to check the Debian version from the command line. As a system administrator, the first question you should ask yourself after getting a new Debian server to manage is what version of Debian am I running? The version of the operating system in use on our server is important as it is critical that we have all the latest updates to ensure that the server is secure. There are a few ways to check your VPS hosting using what version of Debian. With the commands below you can choose one of them to find out which Debian version is running on your system.
- A server running one of the following operating systems: Debian Linux.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Check Debian Version
There are several ways how to check what version of Debian is running on your system. Below you can find multiple examples of how to determine the Debian version.
- Method 1.
The first place to look for the Debian version is to look inside /etc/issue file. From terminal run command:
root@idroot:~# cat /etc/issue Debian GNU/Linux 9 \n \l
- Method 2.
root@idroot:~# cat /etc/debian_version 12.0
- Method 3.
To obtain a Debian release number check content of
root@idroot:~# cat lsb_release -a
Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: Bookworm
- Method 4.
Additional information regarding the Debian version can be found within
root@idroot:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION_CODENAME="bookworm"
- lsb_release Command Not Found:
Should the esteemed
lsb_release command elude your grasp, fear not, for salvation lies in installing the necessary package. Execute the following command and gain access to the elusive command:
sudo apt install lsb-release
- Terminal Intimidation:
If the terminal realm appears daunting, remember that a single misstep shall not unravel the fabric of your system. Exercise caution read error messages with discernment, and seek the wisdom of the Debian community when needed.