How to check your Ubuntu version

s2 0

The first time you log into an Ubuntu system, it is always a good idea to double-check what version of Ubuntu the computer is running before doing any work.

New Ubuntu releases appear every six months, while LTS (Long Term Support) releases appear every two years. LTS versions are supported for five years on both the desktop and the server. Other standard versions are supported for nine months.

This article will show you how to find your version of Ubuntu from the command line or the graphical user interface.

How to check Ubuntu version from command line

There are several commands that you can use to find out which version of Ubuntu you are using.

the lsb_release The utility displays LSB (Linux Standard Base) information about the Linux distribution.

The preferred method to check your version of Ubuntu is to use the lsb_release Utility that displays LSB (Linux Standard Base) information about the Linux distribution. This method works regardless of which desktop environment or version of Ubuntu you’re using.

To check the Ubuntu version from the command line, do the following:

  1. Open your terminal with either the Ctrl+Alt+T Keyboard shortcut or by clicking on the terminal symbol.

  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 above output, I am using Ubuntu 18.04 LTS.

    Instead of printing out all of the above, you can view the description line that shows that your version of Ubuntu supports the -d switch.

    lsb_release -d

    The output should look like this:

    Description:    Ubuntu 18.04 LTS

Alternatively, you can use the commands below to check your Ubuntu version.

Check the Ubuntu version with the /etc/issue file

the /etc/issue The file contains a system identification text. Use the cat
Command to display the contents of the file:

cat /etc/issue

The output looks something like this:

Ubuntu 18.04 LTS n l

Check the Ubuntu version with the /etc/os-release file

/etc/os-release is a file that contains identification data of the operating system. This file can only be found on the newer Ubuntu versions with systemd.

This method only works if you have Ubuntu 16.04 or newer:

cat /etc/os-release

The output looks something like this:

VERSION="18.04 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04 LTS"

Check the Ubuntu version with the hostnamectl command

hostnamectl is a command that lets you set the system’s hostname, but you can also use it to check your version of Ubuntu.

This command only works on Ubuntu 16.04 or newer versions:

   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

Check the Ubuntu version in the Gnome desktop

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

To check your Ubuntu version when using Gnome, please follow the steps below:

  1. Open the System Preferences window by clicking the Settings Icon as shown in the picture below:

  2. In the System Preferences window, click the Details Tab:

    Your version of Ubuntu will appear under the orange Ubuntu logo.


We showed you how to find the version of Ubuntu installed on your system. For more information on Ubuntu releases, see the Ubuntu versions

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