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 –
Options | Description |
---|---|
-v , --version | Display the version of LSB that your system is compliant with |
-i , --id | Display the id of your Linux distributor |
-r , --release | Shows the release number of the current operating system |
-d , --description | Display the description of your Linux distribution |
-c , --codename | It will display the code name of the current operating system |
-a , --all | Display all information that is given above |
-s , --short | Used with the other options to display output in short format |
-h , --help | It 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
[alert color=”green”]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.[/alert]
Conclusion
By reading this article you learn to find the information such as release, codename, distributor Id, etc of a ubuntu system.