How to Check Ubuntu Version / Debian Version

How to Check Ubuntu Version
Ubuntu 16.04.2 LTSHow to Check Ubuntu Version

Question: How to check Ubuntu version / Debian version?

Sometimes you may need to check the version of Ubuntu/Debian installed on your machine. Here are some different ways by which you can find the version of Ubuntu/Debian the machine is running.

LSB Release:

lsb_release is a command can print certain LSB (Linux Standard Base) and Distribution information. You can use that command to get Ubuntu version or Debian version.

You need to install “lsb-release” package.
lsb_release -a



Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

The above output confirms that the machine is running Ubuntu 16.04 LTS.


Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch

From the above output, you can easily find it out that the OS version is Debian 9. File:

Finally, you can also get the OS version details by taking a look at /etc/

cat /etc/



Ubuntu 16.04.2 LTS


Debian GNU/Linux 9

That’s All.

You might also like