How to Check your Ubuntu Version

In this guide, we will show you how to check the version of your Ubuntu installation.

Checking your Ubuntu Version

If you are using an Ubuntu system for the first time, it can be helpful to know what version of Ubuntu you are running.

This is helpful as different Ubuntu versions can utilize and supportĀ  different software that makes configuring the system slightly different.

Canonical pushes out a new release of Ubuntu every six months. These releases can feature anything from minor to significant changes.

Every two years, Canonical will mark a release for long-term support. These versions remain supported for 5 years and are what most servers should be utilizing.

Within this guide, you will learn how you can use the command line or the graphical interface to determine what version of Ubuntu you are running.

Table of Contents

Checking the Ubuntu version using the Command Line

Using the command line there are a variety of ways that you can check the version of Ubuntu.

This section will show you four different ways of working out the Ubuntu version that is simple to use.

If you are using the desktop flavor of Ubuntu, you can open the terminal easily by pressing CTRL + ALT + T.

Alternatively, you can search for the “terminal” application within the activities screen.

Using lsb_release to Retrieve the Version of Ubuntu

For the first method, we are going to show you how to utilize the lsb_release tool.

The lsb_release software will display information about the current operating system, such as its codename, description, and release version.

Being part of the Linux Standard Base (LSB) means that this tool should be available on most newer versions of Ubuntu.

This tool is probably the most straightforward way to check Ubuntu’s version when using the terminal.

1. To use the lsb_release tool to output the Ubuntu version, we can use the following command.

lsb_release -a

By utilizing the “-a“, argument we are telling the tool to output all available release information.

2. From this command, you should end up seeing something like we have below.

This text tells you all you need to know about your current Ubuntu version.

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        Ubuntu 20.04
Codename:       focal

Distributor ID: – Typically, this value is the name of the operating system provider.

As we are running an Ubuntu operating system, this value should be “Ubuntu“.
Description: – In the case of Ubuntu, the description usually holds the long- form version name.

In our example above, you can see that we are running Ubuntu 20.04.1, which is an LTS (Long term support) release.
Release: – Ubuntu uses the release value to only reference the major version number.

The value of this for our example is “Ubuntu 20.04

If you were running an older version of Ubuntu, such as 18.04.5 LTS, this value would be “Ubuntu 18.04“.

Codename: – The final version information this tool gives us is the release codename.

Each major release of Ubuntu is given a codename. Typically the Ubuntu team likes to utilize an animal name as part of their codename.

For example, Ubuntu 20.04 is called Focal Fossa, and Ubuntu 18.04 is called Bionic Beaver.

Viewing the Contents of the lsb-release File

The lsb_release tool is basically a fancy way of displaying the contents of a file stored within the /etc/ directory.

If you wanted you can retrieve your Ubuntu version by outputting this file to the command line.

1. Using the cat command, we can print the /etc/lsb-release file to the terminal.

Use the command below to output the contents of the file to the terminal.

cat /etc/lsb-release

2. Below is an example of what you should see displayed in the terminal.

If you have used the lsb_release command before, you will notice that the results are similar.


Retrieving the Ubuntu Version From The /etc/issue File

Most distributions like Ubuntu come with a file called “issue” stored in the “/etc/ directory.

This file is often used to contain a system identification that is printed before the login prompt.

We can use this system identifier to check our Ubuntu version.

1. Use the following cat command to display the contents of the “/etc/issue” file.

cat /etc/issue

2. From the output of this command, you should see something like the following.

Ubuntu 20.04.1 LTS \n \l

You can see that this text file will typically include the full version name, including the minor version and the LTS designator.

Using /etc/os-release to Check the Ubuntu Version

If the previous two files didn’t get what you needed, we could try looking at the contents of the “/etc/os-release” file.

This file was introduced as a part of the systemd system and service manager.

As Ubuntu only started using systemd in version 16.04, this method will only work for newer releases.

1. We can make use of the handy cat command to get the contents of the file.

Run the following command on your Ubuntu device to output the version information from the file.

cat /etc/os-release

2. By using this command, you should see the following version information appear.

VERSION="20.04.1 LTS (Focal Fossa)"
PRETTY_NAME="Ubuntu 20.04.1 LTS"

This command provides the most amount of information about your operating system, even additional bits of information such as the support URLs.

The two values that you will be most interested in is “PRETTY_NAME” and “VERSION_ID“.

The “PRETTY_NAME” value will provide you the full version name, including whether you are using an LTS release.

The “VERSION_D” value will only tell you the major version of Ubuntu you are using.

Retrieving the Version Using hostnamectl

Our final method for retrieving the version of Ubuntu using the command line is to utilize the hostnamectl tool.

This tool will only provide the information we need on Ubuntu 16.04 and newer, so please try the other methods first.

Typically this tool is used to provide you information about your system’s hostname, but it also provides information such as your Ubuntu version.

1. Using the hostnamectl command is simple.

All you need to do is type the following into the terminal.


2. From this command, you should end up getting a result as we have below.

   Static hostname: pimylifeup
         Icon name: computer
           Chassis: computer
        Machine ID: 0266759ccc6d42aaa421677f7683aad7
           Boot ID: a0cf74546c254e668a59821653736478
  Operating System: Ubuntu 20.04.1 LTS
            Kernel: Linux 5.8.0-40-generic
      Architecture: x86-64

The only thing that we are interested in from this is the “Operating System:” value.

From our example above, you can see that we are currently running Ubuntu 20.04.1 LTS.

Checking the Ubuntu Version on Desktop

It is also possible to use the desktop interface to work out what Ubuntu version you are running.

There are some telltale signs of what version you are running just by looking at the interface.

For this section we will show you how you can find the exact version using the desktop interface in Ubuntu 18.04 and 20.04.

If one section doesn’t look quite right to you, try the other section.

Using the Ubuntu 20.04 Interface

For our first guide, we will show you how to utilize the Ubuntu 20.04 desktop interface to find your exact version number.

These steps should be somewhat similar for most releases of Ubuntu.

1. To retrieve the full Ubuntu version number, we need to get to the settings.

Start by clicking on the top-right of the menu bar.

Open the Quick Panel - Top right corner

2. Once you have the panel open, we can load up settings.

Click the “Settings” option to proceed.

Select the Settings Option

2. Now that we are in the settings dialog, you need to change to the “About” tab (1.).

You can find this tab by looking in the left sidebar. You may have to scroll down as this option is located at the bottom.

Once you are on the “About” page, you can see the current version of your operating system by looking at the value for “OS Name” (2.).

Finding the Ubuntu Version in 20.04

Using the Ubuntu 18.04 Interface

This section will show you the simple steps to getting the full release name when using an 18.04 based release of Ubuntu.

1. First, we need to get to the settings menu.

One of the easiest ways to get to this is by clicking in the top right corner of the taskbar.

Open Desktop Quick panel - Top right corner

2. You should have a dropdown box that appears.

To open the “Settings” menu, click the spanner and screwdriver icon.

Click spanner and screwdriver icon

3. Now that we have the settings menu opened, we need to change to the “Details” tab.

Locate “Details” in the left sidebar and click it.

Find details for Ubuntu version

4. This screen should open directly to the about page.

Here you should be able to see the full name for the release of Ubuntu that you are running.

Finding the Ubuntu 18.04 Version through Desktop Interface


Hopefully, by this stage, you will have a good understanding of how you can check the version of Ubuntu that you are running.

The version number is easily retrievable using both the command line and the graphical interface.

If you have run into issues with finding out what release of Ubuntu you are running, please drop a comment below.

Also, be sure to check out our other Linux and Ubuntu guides.

Leave a Reply

Your email address will not be published. Required fields are marked *