Check Ubuntu Version

Every 6 months Ubuntu’s new version released and every 2 years we get LTS version of Ubuntu. It very important to check the Ubuntu Version you are using if you want to learn something reading tutorials. In this tutorial, you are going to learn how to check Ubuntu Version.

Check Ubuntu Version With Command Line

Checking Ubuntu Version from the command line is the best way to check Ubuntu Version as it does not depend on the desktop environment you are using.

Here we will check Ubuntu Version by using lsb_release (Linux Standard Base) utility. To check Ubuntu Version type following command. This method works always it doesn’t matter which desktop environment you are using.

lsb_release -a

The output should be similar like below:

Output
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

If you want to print only distribution name then type the following command.

lsb_release -d

The output should be similar like below:

Output
Description:	Ubuntu 18.04.1 LTS

Check Ubuntu Version using /etc/os-release file

os-release file contains identification data of operating system. If you are running Ubuntu distro 16.04 or newer then you can use following command.

cat /etc/os-release

The output should be similar like below:

Output
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 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

You can also use /etc/issue file which contains identification data of oprating system to recoganise Ubuntu Version. To check Ubuntu Version type:

cat /etc/issue

The output should be similar like this:

Output
Ubuntu 18.04.1 LTS \n \l

Check System Info using hostnamectl command

hostnamectl command is used to set hostname in Ubuntu but we can also check OS information using this command.

hostnamectl

The output should be similar to this:

   Static hostname: linux4one
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 2381ec6bc94945e781c843f399507ea2
           Boot ID: dafec777a4304a56a98047b1a88b57d0
  Operating System: Ubuntu 18.04.1 LTS
            Kernel: Linux 4.15.0-38-generic
      Architecture: x86-64

Check System Info using Neofetch

Neofetch is a command line utility used to check essential system information. Neofetch shows system information beautifully.

Update the package manager index by typing:

sudo apt update

Install Neofetch command line utility using the following command

sudo apt install neofetch

Now after installation completes you can check system information by using the following command.

neofetch

The output should be similar to this:

Output
            
            .-/+oossssoo+/-.               [email protected] 
        `:+ssssssssssssssssss+:`           --------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 18.04.1 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: 300E4C/300E5C/300E7C 0.1 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 4.15.0-38-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 2 days, 7 hours, 19 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2015 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 4.4.12 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1366x768 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 3.28.3 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: GNOME Shell 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Ambiance [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Ubuntu-mono-dark [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i3-3210M (4) @ 3.100GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce 610M 
      -+sssssssssssssssssyyyssss+-         GPU: Intel 3rd Gen Core processor Graph 
        `:+ssssssssssssssssss+:`           Memory: 4276MiB / 7758MiB 
            .-/+oossssoo+/-. 

Check Version of Ubuntu on Gnome Desktop using GUI

On Ubuntu 18.04 LTS the default desktop environment is Gnome but the previous version of Ubuntu was using Unity desktop environment.

First, Open the system settings windows as shown in the following image and click on the settings icon which first out of three icons at the bottom of the popup box.

You will get system information as below.

How to check Ubuntu Version - check version with GUI
How to check Ubuntu Version – check version with GUI

Conclusion

You have successfully learned how to check ubuntu version using different methods. If you have any queries regarding this please don’t forget to comment below.