Developed by Canonical Ltd., Ubuntu is a free and open-source Linux distribution. It is based on Debian. In this article, we would help you identify your Ubuntu distribution version.
We can identify an Ubuntu release through its version number. Besides, the version number contains the year and month in which that particular version of Ubuntu was released. For instance, Ubuntu 16.04 tells us that the particular version was released in April, 2016. Similarly, we can identify the year and month for other Ubuntu releases also.
Furthermore, it is always better to identify which version of Ubuntu we have been working on. Certainly this helps us identify and fix issues, if any. On other hand, it acts as a catalyst which may push us to upgrade an outdated version.
This article solely focus on how to identify Ubuntu’s distribution version through Command-line interface.
Identify your Ubuntu distribution version
There are four methods we are going to discuss –
Method I. Through command-line utility lsb_release. Here, lsb stands for Linux Standard Base.
lsb_release command-line utility helps us get the distribution related information. So, issue the following in terminal –
-a option is used to print all the distribution related information available.
The output may resemble –
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Focal Fossa (development branch) Release: 20.04 Codename: focal
Method II. Through /etc/os-release file.
We could use cat command-line utility. It will help us read and display the contents of os-release file. So,
This may result in the output similar to –
NAME="Ubuntu" VERSION="20.04 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu Focal Fossa (development branch)" VERSION_ID="20.04"
Method III. Through /etc/issue file. Again, we would use cat command-line utility.
Output may resemble –
Ubuntu Focal Fossa (development branch) \n \l
Lastly, Method IV. Through command-line utility hostnamectl. Issue the following in terminal –
Output may resemble –
Static hostname: techpiezo-pc Icon name: computer-desktop Chassis: desktop Machine ID: XXXXXXXXXXXXXXXXXXXXXXXXXX Boot ID: XXXXXXXXXXXXXXXXXXXXXXXXXX Operating System: Ubuntu Focal Fossa (development branch) Kernel: Linux 5.4.0-14-generic Architecture: x86-64
Although Methods III & IV help us only get the Operating System related information and not the direct release number. Still, we can get an idea which Ubuntu distribution we are working on.
In conclusion, we have discussed how you can identify your Ubuntu distribution version.
Additional Info –
Next Long Term Support (LTS) Ubuntu release will be released on April 23, 2020. It has been code-named Focal Fossa and will be supported till April 2025.