Maybe this is a stupid question.

I would like to know how do I know what is the version of my debian system.

Thanks a lot


Simply run "lsb_release -a" from the command line or "cat /etc/lsb-release"

  • 1
    Although lsb_release -a is much more informative, cat /etc/debian_version is another alternative. – mpy Aug 4 '13 at 11:04
  • The lsb_release command is actually optional. See distribution specific files otherwise (/etc/debian_version, /etc/redhat-release ...) – Franklin Piat Aug 18 '15 at 8:28

If you know that you are on a Debian or derivative, check the file /etc/debian_version. This will have the version number of the currently installed system.

If you want something more generic, look at (particularly) the PRETTY_NAME, NAME, VERSION and VERSION_ID values in /etc/os-release. This file is actually a shell script that you can source into your own scripts, to do things differently on different distributions.

On "true" Debian, both of the above are provided by the base-files package. Derivatives may be different.

Again if you know you are on a Debian system, you can also check the output of apt-cache show base-files to see which version of the base-files package is installed. This also might not work on Debian derivatives.

If you want to know the version of the kernel that is currently running, you can use uname for that. For example, uname -a to print all information, or uname -rv to print the specific kernel version with little extra information. In many cases, you should not need to do this, as what you do should not depend on the specific kernel version installed.

  • Note that this answer was originally posted to superuser.com/q/950410/53590, which was significantly edited after I posted the above answer. – a CVn Aug 4 '15 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.