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 –

-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.


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

Linux Topics 0 Comments

How To Change The Execution Priority Of A Process In Linux?

This post was last updated on August 1st, 2020 at 12:24 pmIn Linux, a process is an instance of a program that is running on a computer. When a program

Linux Topics 0 Comments

How To Add/Remove New User In Linux/Unix

This post was last updated on August 3rd, 2020 at 03:09 pmIn this article, we will learn to add or remove users and giving them required permissions in Linux or

Linux Topics 0 Comments

Understanding the Filesystem (Directory Layout) In Linux

This post was last updated on August 1st, 2020 at 12:58 pmEvery computer stores various types of data on a storage device such as hard disk, USB drive, etc. This


No Comments Yet!

You can be first to comment this post!

Leave a Reply