How To Check Current Version Of Ubuntu Using lsb_release Command?

How To Check Current Version Of Ubuntu Using lsb_release Command?

   

Ubuntu comes in two releases the first one is LTS and the second is standard versions. LTS (Long Term Support) version is released once in two years while standard versions are released once in six months.

The support for LTS is given for five years and for standard versions it is nine months. In this article, we will discuss to find Ubuntu version along with some other information by using the lsb_release command.

Linux Standard Base(LSB)

LSB is a project to standardize the software system structure including the filesystem hierarchy standard used in the Linux kernel. It is based on various open standards such as POSIX, Single Unix Specification(SUS), etc. The goal of LSB is to develop and promote a set of standards to increase compatibility among the various distributions of Linux.

Linux lsb_release Command

The lsb_release command is used to display the LSB information about specific Linux distributions. This information includes the version number, distributor Id, codenames, etc. lsb_release command is part of a package called LSB core. To install it in your system use the following command-

In a debian based system such as Ubuntu, Linux Mint, etc use –

sudo apt install lsb-core

In rpm-based systems such as CentOS, RHEL, etc use –

sudo yum install redhat-lsb-core

To install in Fedora use –

sudo dnf install redhat-lsb-core

Now, look at the syntax of lsb_command –

lsb_release [options]

You can use the following options –

OptionsDescription
-v--versionDisplay the version of LSB that your system is compliant with
-i--idDisplay the id of your Linux distributor
-r--releaseShows the release number of the current operating system
-d--descriptionDisplay the description of your Linux distribution
-c--codenameIt will display the code name of the current operating system
-a--allDisplay all information that is given above
-s--short Used with the other options  to display output in short format
-h--helpIt will display the help message which summarizes these options

How to check the current Ubuntu version in a terminal?

Now by using the lsb_release command with the given option, you can display the version of Ubuntu installed in your system. Use the following command to display the version related information –

lsb_release -r

Or use the following command to display all the information of the ubuntu installed in your system –

lsb_release -a


If you receive a message “No LSB modules are available” that means you need to install the LSB core package as discussed in the above section.

Conclusion

By reading this article you learn to find the information such as release, codename, distributor Id, etc of a ubuntu system.

Previous How To Display The System Information Using uname Command In Linux/Unix?
Next Understanding Promises in JavaScript

About author

You might also like

Uncategorized 0 Comments

How To Install And Configure Xfce In FreeBSD?

This post was last updated on July 14th, 2020 at 05:39 pmXfce is a free and opensource desktop environment that aims to be lightweight, fast, and low on system resources

Uncategorized 0 Comments

How To Create A Zip File In Linux?

Zip is an archive file format that supports lossless data compression. Zipping and unzipping tools are available for various platforms. Windows and macOS and many other OS are providing built-in

Uncategorized 0 Comments

How To Upgrade To Ubuntu 20.04 LTS From Ubuntu 18.04 Or Ubuntu 19.10?

Ubuntu comes in two releases the first one is LTS and the second is standard versions. LTS (Long Term Support) version is released once in two years while the standard

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply