How to check the lsb_release of your redhat based Linux distros
To check the lsb_release of your RedHat based Linux Distros
LSB stands for Linux Standard Base which is an effort to standardize the structure of Linux related operating systems. It increases compatibility among systems that use different versions of Unix and to make them more compatible with non-Unix systems as well. The main reason is due to the difference between various Unix flavors which have caused problems in systems and networks where more than one flavour was found. So this standardization would enlarge the customer base and their satisfaction and decrease the cost of overcoming incompatibility issues.
Installation
In Debian based distributions the lsb_release comes by default and you can verify by using the following command directly from the terminal
linuxhelp ~ # lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 18.3 Sylvia
Release: 18.3
Codename: sylvia
But in RedHat distributions, if you run the following command you will face the following output
[root@linuxhelp ~]# lsb_release
bash: lsb_release: command not found...
Let’ s see How to install lsb release before that we should find which package provides lsb release.
[root@linuxhelp ~]# yum provides */lsb_release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.dhakacom.com
* extras: mirror.dhakacom.com
* updates: mirror.dhakacom.com
base/7/x86_64/filelists_db | 6.7 MB 00:00:00
.
.
redhat-lsb-core-4.1-27.el7.centos.1.x86_64 : LSB Core module support
Repo : base
Matched from:
Filename : /usr/bin/lsb_release
As you see in the above output, redhat-lsb-core-4.1-24.el7.x86_64package provides the lsb_release command. So let us install it to use the lsb_release command.
[root@linuxhelp ~]# yum install redhat-lsb-core
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.dhakacom.com
* extras: mirror.dhakacom.com
* updates: mirror.dhakacom.com
Resolving Dependencies
--> Running transaction check
.
.
Installed:
redhat-lsb-core.x86_64 0:4.1-27.el7.centos.1
Dependency Installed:
m4.x86_64 0:1.4.16-10.el7 patch.x86_64 0:2.7.1-8.el7 redhat-lsb-submod-security.x86_64 0:4.1-27.el7.centos.1
spax.x86_64 0:1.5.2-13.el7
Complete!
The LSB release of your command should work now.
[root@linuxhelp ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core
With this, the method to check the lsb_release of your RedHat based Linux distros comes to an end.
Note that buying new hardware is not necessary to use GNU/Linux!