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 9 \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 linux command:
root@debian:~# cat /etc/debian_version 9.0
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_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/"
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 on your debian box:
$ lsb_release -da No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.0 (stretch) Release: 9.0 Codename: stretch
systemd debian version you may also use
# hostnamectl Static hostname: debian Icon name: computer-vm Chassis: vm Machine ID: 6866ec1d654b4a2ea52d591dc0146d82 Boot ID: 51bfbc1e197b4d378e95073da0df0288 Virtualization: xen Operating System: Debian GNU/Linux 9 (stretch) Kernel: Linux 4.9.0-1-amd64 Architecture: x86-64
To check a version of other Linux distributions visit our how to check Linux version guide.