• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Check Debian Version with Different Methods

Written by Admin, Updated On May 7, 2019
debian, terminal
How to Check Debian Version

If you have installed fresh Debian or updated version then it’s best to check version of Debian OS. In this tutorial, we will show you how to check OS version using different methods.

Types of Debian Releases#

  • Stable – This is the stable and official released by Debian. The latest Debian version is Debian 9 (stretch). So this release can be use for production server.
  • Testing – This type of release can’t be use for production server. It contains packages with unstable version and updated frequently.
  • Unstable – It is known as sid. Currently development version will be converted to Unstable.

Check Debian Version using Command Line#

It is best practice to check version using command line as it is not depend on anything. So here we are going to check Debian version using lsb_release (Linux Standard Base) utility. Commonly, this method is best because it will work regardless of any desktop environment or version you are using.

lsb_release -a

It will show output as below:

Output
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch

From the above output you can see that Description line is showing OS version.

Instead of print all the details of your Debian system, you can simply print only distribution name by passing -d with command:

lsb_release -d

The output should be similar like below:

Output
Description: Debian GNU/Linux 9.5 (stretch)

Check Debian Version using /etc/os-release file#

os-release file contains identification data of operating system and this available only with newer Debian distribution.

cat /etc/os-release

The output will be similar as below:

Output
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/"

Check Debian Version using /etc/issue file#

Like, os-release the /etc/issue file also contains the system identification text. Using below command you can see it:

cat /etc/issue

It will show output as following:

Output
Debian GNU/Linux 9 \n \l

Check Debian Version using hostnamectl command#

Mostly, hostnamectl command is used to set hostname in Debian systems but you also can check the system details using it. Execute below command:

hostnamectl

This command will work only for Debian 9 and newer versions. It should show output as below:

Output
Static hostname: local.tecnstuff
Icon name: computer-vm
Chassis: vm
Machine ID: 287b816ad03c4f429f7bb49501983e1c
Boot ID: 7fd5cca4dd5c41f6ac53214e11fa3f57
Virtualization: oracle
Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 4.9.0-8-amd64
Architecture: x86-64

Like this, you can get your OS version using any one of these method.

Conclusion#

Finally, you successfully learned how to check OS version using different methods. You can get more information on Debian releases at official site of the Debian Releases.

If you have any question or suggestion don’t forget to comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Stop and Disable Firewalld on CentOS 7
Next Article   How to Install Node.js and npm on Debian 9

Related Posts

  • How to Install LibreOffice 7.0 on Debian 10

    How to Install LibreOffice 7.0 on Debian 10

    January 25, 2021
  • How to Install AnyDesk on Debian 10

    How to Install AnyDesk on Debian 10 Buster

    January 23, 2021
  • How to Install Php 8 on Debian 10

    How to Install PHP 8 on Debian 10

    January 2, 2021

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS 8
    How to Install Python 3.9 on CentOS 8 December 31, 2020
  • How to Install Php 8 on Debian 10
    How to Install PHP 8 on Debian 10 January 2, 2021
  • How to Install Php 8 on Ubuntu 20.04
    How to Install PHP 8 on Ubuntu 20.04 December 28, 2020
  • How to Install GIMP on Debian 10
    How to Install GIMP 2.10 on Debian 10 December 27, 2020
  • How to Install GIMP 2.10 on CentOS 8
    How to Install GIMP 2.10 on CentOS 8 December 30, 2020
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook