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.

FAQ
Q
Why are some GNU/Linux distributions not fully free?
A
Some GNU/Linux distributors allow non-free software in order to enable hardware functionality. This happens because some hardware manufacturers such as NVidia do not care about their customers' freedoms, and only release restricting firmware and drivers (some of them don't even release anything, like Broadcom). These are available at no cost (they are freeware) but under restrictive licenses. Distributions such as Ubuntu thus include such components to improve hardware compatibility.
Q
Does GNU/Linux come pre-installed on computers?
A
Yes it does. LinuxPreloaded.com has built a website specially for that purpose, listing vendors that sell GNU/Linux desktops and laptops.

Note that buying new hardware is not necessary to use GNU/Linux!
Q
What is the main usage of lsb_release in Linux?
A
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
Q
Why does lsb_release -a list all those modules?
A
From the lsb_release man page, it seems like that's the normal thing, look at the description for -v and -a, -v says ...The version is expressed as a colon-separated list of LSB module descript
Q
How do I find out what version of Linux using the "lsb_release" command on Ubuntu?
A
Use the following syntax to find out what version of Linux using the "lsb_release" command on Ubuntu, "cat /etc/lsb_release"