
Ubuntu releasing new version at every six months and LTS (Long Term Support) releasing at every two years. It is best practice to check the Ubuntu version before you use it. In this tutorial, we have described how to check version with different methods. You can check using command line as well from the graphical interface.
Check Ubuntu Version using Command Line
It is good practice to check version using command line as it is not depend on anything. So here we are going to check Ubuntu version using lsb_release
(Linux Standard Base) utility. Generally, 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: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
From the above output you can see that Description line is showing OS version.
Instead of print all the details of your Ubuntu 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: Ubuntu 18.04.2 LTS
Check Ubuntu Version using /etc/os-release file
You also can check version using os-release
file. It contains identification data of operating system and this available only with newer Ubuntu distribution. This method will work only if you have Ubuntu 16.04 or newer.
cat /etc/os-release
The output will be similar as below:
Output
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
Check Ubuntu 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
Ubuntu 18.04.2 LTS \n \l
Check Ubuntu Version using hostnamectl command
Mostly, hostnamectl command is used to set hostname in Ubuntu systems but you also can check the system details using it. Execute below command:
hostnamectl
This command will work only for Ubuntu 16.04 and newer versions. It should show output as below:
Output
Static hostname: local.tecnstuff
Icon name: computer-laptop
Chassis: laptop
Machine ID: 39bb66809520461594c31b34a4829d7b
Boot ID: 5b6b4bc9e7584e4ba62313eeaab9dd61
Operating System: Ubuntu 18.04.2 LTS
Kernel: Linux 4.15.0-46-generic
Architecture: x86-64
Check Ubuntu Version in the Gnome Desktop
With Ubuntu 18.04 LTS the default desktop environment is Gnome but the previous version was using Unity desktop environment.
Follow the below steps below to check version if you are using Gnome.
At first, open the system settings window and click on the Settings icon as shown in the image below:

Now click on Details tab under system settings window.

You can see your Ubuntu version under the Ubuntu logo.
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 of Ubuntu releases at official site of the Ubuntu Releases.
If you are using Ubuntu 16.04 then you can Upgrade using this tutorial Upgrade Ubuntu 16.04 to Ubuntu 18.04 LTS
If you have any question or suggestion don’t forget to comment below.
Leave a Reply