How To Check Current Version Of Ubuntu Using lsb_release Command?

How To Check Current Version Of Ubuntu Using lsb_release Command?

 

This post was last updated on August 1st, 2020 at 12:40 pm

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 How To Assemble Files With Cat Command In Linux/Unix?
 

About author

You might also like

Linux Topics 0 Comments

How To Install PuTTY In Linux And Use It As An SSH Client?

This post was last updated on August 1st, 2020 at 10:12 pmEarlier I published how to connect to a Linux server using SSH using the command line. This article describes

How To 0 Comments

How To Split A Large File Into Multiple Smaller Files In Linux/Unix?

This post was last updated on August 1st, 2020 at 12:32 pmSuppose you have an archive file of size more than 5GB, and if you want to burn it on

Commands 0 Comments

How To Display The System Information Using uname Command In Linux/Unix?

This post was last updated on August 1st, 2020 at 12:42 pmUname is a command used in Linux/Unix to print the system information. Most commonly used to determine the processor

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply