Check Debian Version from the Command Line

In this tutorial, we will look at how to check your Debian version from the command line. It is quite normal not to know which version of an operating system you are running especially if it is a server that you have inherited.

In other cases, you may simply be administering quite a few servers with different versions of operating systems and you may not necessary remember what version of Debian is installed on a particular system. Whatever the reason is, we will learn how to check the version of Debian that is running using only the command line.

Check Debian Version using the terminal

Below we show the 2 most popular methods of checking your Debian version using a terminal. This is by no means an exhaustive list of the ways of checking your Debian version.

1) Open a terminal and run the following command:

lsb_release -a

You should get a result like:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.3 (squeeze)
Release: 6.0.3
Codename: squeeze

In the example above, we see that the server is running Debian 6.0.3.

2) In case that command does not work, there is another way to check your Debian version. Execute the following in a terminal:

cat /etc/debian_version

You should get a result like:


Once again, we see that the server is running Debian 6.0.3.

That brings us to the end of this tutorial on checking your Debian version using the command line. We hope you found it useful. Try not to forget it now, but if you do you can always come back to this tutorial :-)

Thank Tutorial Arena for This Tutorial.
Show your appreciation with a +1...