Tuesday, May 24, 2016

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 content of /etc/issue file. Example:
root@debian:~# cat /etc/issue
Debian GNU/Linux 7 \n \l

However, the above command may not show the current Debian update point releases. Thus you may get more accurate info with the following command:
root@debian:~# cat /etc/debian_version
7.7

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 command to see what debian version you are running on your debian box:
# lsb_release -da
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.7 (wheezy)
Release: 7.7
Codename: wheezy

For systemd debian version you may also use hostnamectl:
# hostnamectl 
   Static hostname: debian
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4c983dae19f6403ca2c555c3867beb14
           Boot ID: 3b399eb976d04569a8514a1d666a4d81
    Virtualization: oracle
  Operating System: Debian GNU/Linux 8 (jessie)
            Kernel: Linux 3.16.0-4-amd64
      Architecture: x86-64
 
https://linuxconfig.org/check-what-debian-version-you-are-running-on-your-linux-system 

No comments: