Check what Debian version you are running on your Linux system

The easiest way on how to check what Debian version you are running is to simply read a contents from /etc/issue file. Example:

root@debian:~# cat /etc/issue
Debian GNU/Linux 9 \n \l

However, the above command may not show the current Debian update point releases. You may get more accurate info with the following command:

root@debian:~# cat /etc/debian_version

Next, you can check for /etc/os-release release file:

# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION="9 (stretch)"

An alternative way is by use of lsb_release command. This command may be missing by default so you may need to install it first:

# apt-get install lsb-release

Once you install the above package run the following linux command to see what debian version you are running:

$ lsb_release -da
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.0 (stretch)
Release:        9.0
Codename:       stretch

For systemd debian version you may also use hostnamectl:

# hostnamectl 
   Static hostname: www
         Icon name: computer-container
           Chassis: container
        Machine ID: 6866ec1d654b4a2ea52d591dc0146d82
Boot ID: 51bfbc1e197b4d378e95073da0df0288
Virtualization: openvz Operating System: Debian GNU/Linux 9 (stretch) Kernel: Linux 4.9.0 Architecture: x86-64


  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to upgrade Debian 8 Jessie to Debian 9 Stretch

How to upgrade Debian 8 Jessie to Debian 9 Stretch This knowledgebase article explains a system...

Check what CentOS version you are running on your Linux system

There are several ways on how to check what version of CentOS is running on your system. The...

How to monitor my Linux system and gather statistics

You can use following Linux commands to help monitoring your Linux system performance, gather...