Read in 3 minutes

last updated 

How to check your Ubuntu Version

This tutorial is also available for:

centos

When you login to an Ubuntu system for the first time, before doing any work it is always a good idea to check what version of Ubuntu is running on the machine.

New Ubuntu releases come out every 6 months, while LTS (Long Term Support) releases occur every two years. LTS versions are supported for 5 years on both desktop and the server, other standard releases are supported for 9 months.

In this tutorial, we’ll show you how to find your Ubuntu version. There are several ways to check what version of Ubuntu you are running. You can either check from the command line or from within the graphical interface.

How to check Ubuntu version from the command line

This is the preferred method and will work no matter which desktop environment or Ubuntu version you are running.

Follow the steps below to check Ubuntu version from the command line:

  1. Open your terminal either by using the Ctrl+Alt+T keyboard shortcut or by clicking on the terminal icon.

  2. Use the lsb_release -a command to display the Ubuntu version.

    lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 18.04 LTS
    Release:    18.04
    Codename:   bionic

    Your Ubuntu version will be shown in the Description line. As you can see from the output above I am using Ubuntu 18.04 LTS.

Alternatively, you can also use the following commands to print your Ubuntu version.

The following command will display the contents of the /etc/issue which contains a system identification text:

cat /etc/issue
Ubuntu 18.04 LTS \n \l

`/etc/os-release is a file which contain operating system identification data, and can be found only on the newer Ubuntu versions running systemd.

This method will work only if you have Ubuntu 16.04 or newer:

cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 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

hostnamectl is a command that allows you to set the hostname but you can also use it to find your Ubuntu version.

This command will work only on Ubuntu 16.04 or newer:

hostnamectl
   Static hostname: linuxize
         Icon name: computer-vm
           Chassis: vm
        Machine ID: f1ce51f447c84509a86afc3ccf17fa24
           Boot ID: 2b3cd5003e064382a754b1680991040d
    Virtualization: kvm
  Operating System: Ubuntu 18.04 LTS
            Kernel: Linux 4.15.0-22-generic
      Architecture: x86-64
Advertisement

How to check Ubuntu version from the Gnome desktop

Gnome is the default desktop environment in Ubuntu 18.04 (Bionic Beaver). Previous versions of Ubuntu used Unity as the default desktop environment.

Follow the steps below to check your Ubuntu version if you are using Gnome:

  1. Open the system settings window by clicking on the Settings icon as shown in the image bellow:

  2. In the system settings window click on the Details tab:

    Your Ubuntu version will be shown under the orange Ubuntu logo.

Conclusion

In this guide we have shown you how to find the version of Ubuntu installed on your system.

If you are running Ubuntu 16.04, and you want to upgrade Ubuntu 18.04, check the following instructions:

For more information on Ubuntu releases visit the Ubuntu Releases page.

Feel free to leave a comment if you have any questions.