When you enter into the Linux domain, especially when dealing with open-source software and applications, you will notice that its active community keeps rolling out new software and application releases. Because of this growing attribute from the Linux community, it is always good to keep yourself version-conscious. The latter phrase, version-conscious, implies that you need to check up not only on the software and applications you have running on the OS environment but also on the Linux operating system’s status.
For this reason, this article is here to explore various ways through which you will be able to know which version of the Ubuntu Operating System you are running at any time. First, you need to know about the types of software version releases in the Linux world. Under Ubuntu, we have the Normal Releases, which most Linux users find themselves using, and the Long Term Support (LTS) releases, which are often specified on the ISO or image file name Ubuntu OS upon its download.
The Linux Version-Release Concept
A new version of the Normal Release is accessible to Linux users every 6 months. That is why you are advised to update and upgrade your Linux OS within a fixed and continuous calendar period. As for the LTS Release, a new Ubuntu version is accessible to its community users every 2 years. The support of these released LTS versions continues for a period of 5 years. This support applies to both Desktop and Servers operating systems. The Normal Releases of the Ubuntu operating systems are also classified under Standard Releases. The support of these Standard Releases has a lifespan of 9 months.
Regardless of the OS version release that your Ubuntu OS falls under, it does not affect its performance in any way. Think of the support period of these OS releases as a duration or countdown period for changing a paint coat on a wall until that improved version of the paint coat is no longer accessible from the manufacturer. But you can still access and use the last improved paint coat that existed before the manufacturer stopped producing it.
When the support period of a Linux OS ends, a new version with new or altered features comes to life, and then the countdown of its support period also commences. This technique is employed in many Linux distributions and ensures a competitive improvement in each Linux distribution release. That is why we enjoy new features and functionalities every time we make a fresh install or upgrade of a Linux Operating System.
Checking your Ubuntu version
The importance of knowing your Ubuntu version is obvious. You might be too engaged in your Linux OS projects or OS usage and not be aware of a new Linux OS version release within the Linux community. So you might be missing new features and improvements that might make your Ubuntu lifestyle easier. Knowing your Ubuntu version will help you check on the currently available and active release version and make an upgrade if necessary or schedule a calendar period for making the upgrade before the OS version support window closes.
Using the lsb_release Command
The Ubuntu Linux OS distribution has several commands at your disposal to determine the OS version running on your machine. Under the lsb_release utility, you will find LSB (Linux Standard Base) information related to the Linux distribution you are using. This command-line approach queries the lsb_release utility for information regarding the Ubuntu OS version you are using. It is effective regardless of the Ubuntu Desktop environment you have installed or the Ubuntu distribution you have running on your machine.
The first step to using this approach is to launch your Ubuntu terminal. You can do it the old-fashioned way by launching it from the Show Applications menu, or you could use the keyboard shortcut Ctrl+Alt+T. Now, key-in on your Terminal -a following lsb_release command.
$ lsb_release -a
You should be able to get an output similar to the following.
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.1 LTS Release: 20.04 Codename: focal
The Description part of this output depicts the Ubuntu version you are using. About this output, from my end, I am using Ubuntu 20.04.1 LTS. Alternatively, since we are only after the Description part of this command’s output, we can use the –d argument with the lsb_release command to output the Ubuntu version.
$ lsb_release -d
Description: Ubuntu 20.04.1 LTS
The output on my end only produced the Ubuntu version Description as promised. You now know one way to determine your Ubuntu version. Let us unleash the other approaches.
Using the /etc/issue File to Check Your Ubuntu Version
The next command familiarizes you with the /etc/issue file on your Ubuntu system. This file holds information regarding your system’s identification. This information is stored in a text format. To access it, we will borrow the functionality of the cat command. With your Ubuntu terminal still open, key-in the following command string.
$ cat /etc/issue
As expected, the following is the output on my end:
Ubuntu 20.04.1 LTS \n \l
Using the /etc/os-release File to Check Your Ubuntu Version
Another important file on your Ubuntu system is the /etc/os-release file. It is responsible for your Ubuntu system’s identification data. The /etc/os-release system file does not apply to older Ubuntu operating systems versions. It is because the newer versions have the systemd module running. For your Ubuntu system to qualify as a candidate for this system file, the Ubuntu OS version you are running needs version 16.04 or newer. Time to find out if you are using a more recent version release of the Ubuntu operating system. Key-in the following command on your terminal.
$ cat /etc/os-release
This command’s output is quite detailed and will look something similar to the following.
NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.1 LTS" VERSION_ID="20.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=focal UBUNTU_CODENAME=focal
Under the PRETTY_NAME part of the output is our Ubuntu version release, Ubuntu 20.04.1 LTS.
Using the /etc/lsb-release file
This approach is straight forward and also borrows the cat command’s functionality. We will need this command to access the Linux operating system’s /etc/lsb-release file details. With your Linux terminal still open, key-in the following command string.
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
As you can see, the DISTRIB_DESCRIPTION section of the command output details the Ubuntu version release; Ubuntu 20.04.1 LTS.
Using the hostnamectl Command
This command’s primary role or responsibility is to configure the hostname of your Ubuntu operating system. On the other hand, its usage is flexible enough to relay information regarding your Ubuntu system release version. Your Ubuntu release version needs to be 16.04 or newer for you to reap the benefits of this command. But there is only one way to find out if this command works on your Ubuntu OS. Key-in the following command on your terminal.
Static hostname: FOSSlinux Icon name: computer-laptop Chassis: laptop Machine ID: 0ca3f2c5e5914fc7bc4d436f6cdd6a79 Boot ID: 56ece357b3fe46e589217eb903efbeaf Operating System: Ubuntu 20.04.1 LTS Kernel: Linux 5.4.0-54-generic Architecture: x86-64
As you can see, the command holds some in-depth, detailed technical data regarding the operating system I am using. Under the Operating System part of this output, we have the Ubuntu release version in use; Ubuntu 20.04.1 LTS.
Using the Ubuntu GUI Desktop Environment to Check Your Ubuntu Version
This option applies to Ubuntu users that are yet to adapt to the flexibility of using the Linux terminal to generate information regarding their operating system. By default, a Linux distribution like Ubuntu is prepackaged with both a non-graphical user interface and a graphical user interface or GUI. GNOME is a GUI Desktop environment for your Ubuntu operating system. It is the default desktop environment installation if you are using Ubuntu Bionic Beaver (Ubuntu 18.04) or Focal Fossa (Ubuntu 20.04). The previous Ubuntu OS versions have Unity as their default Desktop environment GUI.
The following steps define the GUI approaches to let you know about your Ubuntu OS release version.
Trace the System Settings Icon on your Ubuntu Desktop environment. The screenshot below gives a clear depiction of where you should look.
Clicking on the Settings Icon will open a Settings window where you should trace the About Menu on the left side of this Settings Window and click on it. You should be able to see some details regarding the nature of the operating system you are using.
If you look closely, you will see the OS name section listed. On my end, it details Ubuntu 20.04.1 LTS as the current official release version.
Knowing the current version of your Ubuntu version might seem like a small stretch or a non-priority at the moment. As you grow more to the Linux environment, your experience and exposure to this OS will lead you to both command-line interface and GUI challenges. The new Linux version releases are responsible for resolving such challenges. Also, there could be new OS feature alternatives that will help improve your user experience. Such info will help you query and know when a new Linux OS version release is available for download and installation. You will also be familiar with the features and improvements the Linux OS version releases bring to the table. A comfortable Linux user is an updated Linux user. To keep the Linux spirit alive, we need to stay updated and upgraded with our Operating Systems.