CentOS: lsb_release: command not found

First let me declare that I’m new to CentOS. The folowing is a note to self which demonstrates how we search for a package that provides some commands and intall it using yum on CentOS.

When I ran ‘lsb_release -a’, the following message is returned:

-bash: lsb_release: command not found

To fix it, we need to install the package which provides lsb_release command.

# yum provides */lsb_release
...
redhat-lsb-4.0-3.el6.centos.i686 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

redhat-lsb-4.0-3.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

dkms-2.2.0.3-2.el6.noarch : Dynamic Kernel Module Support Framework
Repo        : epel
Matched from:
Filename    : /usr/lib/dkms/lsb_release

So, let’s install redhat-lsb package:

# yum install redhat-lsb

...
Transaction Summary
==========================================================
Install     106 Package(s)

Total download size: 86 M
Installed size: 246 M
Is this ok [y/N]: 
...

Wow, the insalled size of 246 M? No, it’s not ok.

Update (6/01/14):
Corrected typo in this post, thanks to Shawn:
lbs_release lsb_release: command not found

5 thoughts on “CentOS: lsb_release: command not found

  1. livewire says:

    Fedora has redhat-lsb-core package (install size 34M all in) which solved the same problem on my machine – not sure if it’s available on centOS…

  2. That is because that redhat-lsb package has all the stuff for lsb – perl modules, extra gui stuff and so on. Lsb-release is a tiny bit of a big virtual package. The core may be smaller – but I suspect still references many other bits.

  3. Shawn says:

    In your returned error, re-read what the error states – “-bash: lbs_release: command not found”. Looks like a typo in the original command. I just recently installed CentOS 6.5 from the live DVD and ran this command without issue. Just check for typos 🙂

    • Hi Shawn

      Well spotted. In fact, it was just a typo in this post. My installation of CentOS was used the minimal iso CD, and ‘lsb_release’ did not come with it.

Leave a comment