Find your Debian version, the command line way

Like every VPS addict it is quite normal to forget which version of an operating system you are running especially if it is a server that you haven’t logged onto for a long time.

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.

so without further ado…..

Terminal commands that shows the Debian Version

There are many ways to find the version, here I will show two different ways. Feel free to post more ways in the comment section.

If you only need the version number the easiest way is to execute the following command

You should get a result like this:

There you have it, the server is running Debian 7.6!

Another command, that also gives a bit more information is

You should get a result like:

To find the Kernel version use the ‘uname‘ command. Using it without parameters will only print out ‘Linux’ and if you didn’t know that you were running Linux you are in trouble 🙂

prints all Kernel information

prints your kernel version which is useful for installing things like the kernel headers, for example:

Do you know more ways to get the OS version from the command line? Post a comment with your suggestions!

5 comments for “Find your Debian version, the command line way

  1. Aevi
    December 24, 2015 at 09:53

    Thanks for help. Can you please tell what font is used in commands like  you have written

    cat /etc/debian_version, lsb_release -a

    • December 26, 2015 at 14:49

      it is the Monaco font, using the Crayon Syntax Highlighter plugin.

  2. Pat
    July 25, 2016 at 18:15

    Very well written guide. Certainly helps when logging into multiple machines.

  3. October 4, 2017 at 17:57

    what should i do if get result like this? I’m run on docker


    root@88bd0a44e6ce:/# lsb_release -a
    bash: lsb_release: command not found

  4. October 9, 2017 at 20:35

    Thanks on your marvelous posting! I truly enjoyed rrading it, you ccan be
    a great author.I will make certain to bookmark your blog and will eventually come back at some point.

    I want to encourage yourself to continue your great writing,
    have a nice evening!

Leave a Reply

Your email address will not be published. Required fields are marked *