Table of Contents
If you are an Ubuntu user, there is a high probability you have come across an error, and you went online to find a solution from the various tech forums. Unfortunately, some solutions won't work since you use a different version/ release of Ubuntu from the one mentioned in the solution. There are also situations where you want to install an application, but you get an error like, "Repository does not have a release file." Therefore, knowing the Ubuntu release running on your Computer is quite essential.
To better understand these differences in Ubuntu versions, we need to discuss the Ubuntu release cycle before you can check Ubuntu version.
Ubuntu Release Cycle
Ubuntu is made available to users through the Long Term Support release (LTS) and Interim releases. As the name suggests, Long Term Releases or commonly referred to by the abbreviation LTS is the Ubuntu version supported for the longest time. That is always up to five years for standard support and ten years for Enterprise-grade support. LTS releases are published after every two years in April. As of writing this post, the most popular Ubuntu LTS releases are Ubuntu 180.4 and Ubuntu 20.04.
On the other hand, Interim releases are published every six months LTS releases and are only supported for nine months. As of writing this post, the latest interim release is Ubuntu 21.10 that uses the code name Impish Indri.
This post will give you a detailed guide on checking the Ubuntu version running on your system. There are two ways which we can use to achieve this:
- The Command-line method (Terminal)
- The Graphical User interface (GUI)
If you are a command-line person, then you have more than enough methods which you can use to check the version of Ubuntu running on your system. All you need is to run a simple command, and you are good to go.
Method-1: Use the
lsb_release -a Command
The lsb_release command which is present in all Linux systems shows the Linux Standard Base (LSB) information about the current Linux distribution running on your system. That includes the codename and version number. Follow the steps below.
Launch the Terminal from the applications menu or use the keyboard shortcut (Ctrl + Alt + T)
Type the command "lsb_release -a" into the command line and press enter.
From the image above, you will get information like Distributor ID, Description, Release version, and the release code name.
Method-2: Read the Contents of
This method is not very different from the
lsb_release -a command. Instead of using the
-a parameter, we will just read the contents inside the
lsb_release file present in the
/etc directory using the
cat command. Follow the steps below.
Launch the terminal from the applications menu or use the keyboard shortcut [Ctrl] + [Alt] + [T].
Type the command
cat /etc/lsb-release into the command line and press Enter.
From the image above, you can see the terminal displays the Ubuntu version you're running under
Method-3: Read the Contents of the /etc/os-release File
Before we dive in on how to use this method, let's discuss the files
os_release in detail since they are somewhat similar.
/etc/lsb-release file is found in most (but not all) Linux distributions intended for use by older programs. The LSB which stands for Linux Base Standards is a project that defines rules and standards Linux distros should follow. However, not all Linux systems include these file.
On the other hand, the
/etc/os-release file is that standard set and you will find it in almost all Linux distributions. Additionally, any Systemd-based distribution like Ubuntu, RHEL, CentOS, Gentoo, etc is required to have it by default. Therefore, if the
lsb-release command above didn't work for you, you should try using the
os-release. Follow the steps below.
Launch the Terminal
Display the contents of the
/etc/os-release file using the cat command as shown below.
From the image above, you can view the version of Ubuntu running on your system next to the
Method-4: Read the Contents of the
/etc/issue file is a standard file across all distributions which contains a message to be displayed before the logging prompt.
Open the terminal using “Show Applications” or with the keyboard shortcut [Ctrl] + [Alt] + [T].
Type the command "
cat /etc/issue" into the command line and press enter.
Method-5: Check Ubuntu Version with hostnamectl Command
Another command that also gives you information about the Ubuntu version is the
hostnamectl command. Run the command as shown below.
Method-6: View the Ubuntu version via GUI
In the case you don't like to use the command line, there's always a way to view the Ubuntu version via GUI. This will be different depending on the desktop environment you're using. In the GNOME desktop environment on Ubuntu, the available information is found in the Settings > About section.
Ubuntu offers many ways for us to check the version of the operating system. Knowing which version of Ubuntu you're on, and what type of release it is – either long term support or interim – will help you determine several things like when to update, which software to install, and much more. We recommend keeping your Ubuntu system up-to-date, especially with the latest LTS releases. However, if you love living on the bleeding edge, you can also check out the interim releases which come with the latest features.