lsb_release
lsb stands for Linux Standard Base.
Certain LSB (Linux Standard Base) and Distribution information is printed by lsb_release command.
You can view information about your Linux distribution with the lsb_release command. For instance, it shows information on LSB modules. Additionally, the distributor’s ID and release number are displayed.
ubuntu@ip-10-11-112-26:~$
ubuntu@ip-10-11-112-26:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
ubuntu@ip-10-11-112-26:~$
You can see your Ubuntu version, along with separate lines for the release number and its description, using the /etc/lsb-release command. If you’re using an old version of Ubuntu, you might like to use it since it is made for older systems.
ubuntu@ip-10-11-112-26:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
ubuntu@ip-10-11-112-26:~$
Other options for lsb_release are as follows
- -v, –version : Shows the LSB version that the distribution complies with. A list of LSB module descriptions separated by colons is used to express the version. The module name, version, and architecture name are contained in dash-separated tuples that make up LSB module descriptions.
- -i, –id : Displays string id of distributor.
- -d, –description : Displays single line text description of distribution.
- -r, –release : Displays release number of distribution.
- -c, –codename : Displays codename according to distribution release.
- -a, –all : Displays all of the above mentioned information.
- -s, –short : Displays all the above information in short format.
- -h, –help : Displays a human-readable help message.