• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

lsb_release: command not found

by Deepika

The minor version of RHEL server is defined by the /etc/redhat-release file and it belongs to redhat-release-server package. The lsb_release script points to /etc/redhat-release which gives the same output as ‘cat /etc/redhat-release’. Linux Standard Base (LSB) is basically a standard that multiple distributions sign up to. It specifies a Filesystem Hierarchy Standard (FHS), as well as various other components of a Linux system.

You might have noticed the Ubuntu usage of lsb_release to grab its OS version; the same can be done on CentOS, but first, lsb_release needs to be installed:

# yum install redhat-lsb-core

Now, we can run the same command that Ubuntu uses in order to get OS information:

$ lsb_release -s -d
"CentOS Linux release 7.5.1804 (Core) "

The same can be done on Debian, without having to install anything by default:

$ lsb_release -s -d
Debian GNU/Linux 9.5 (stretch)

If you encounter the below error while running the command lsb_release:

lsb_release: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install lsb-release
Ubuntu apt-get install lsb-release
Arch Linux pacman -S lsb-release
Kali Linux apt-get install lsb-release
CentOS yum install redhat-lsb-core
Fedora dnf install redhat-lsb-core
Raspbian apt-get install lsb-release

lsb_release Command Examples

1: Print all available information:

# lsb_release -a

2: Print a description (usually the full name) of the operating system:

# lsb_release -d

3: Print only the operating system name (ID), suppressing the field name:

# lsb_release -i -s

4: Print the release number and codename of the distribution, suppressing the field names:

# lsb_release -rcs

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to use wget to download file via proxy
  2. pivpn Command Examples in Linux
  3. whiptail Command Examples in Linux
  4. Unmounting a Windows Share Fails in Linux
  5. bosh Command Examples (Command-line tool to deploy and manage the bosh director)
  6. makepkg Command Examples in Linux
  7. gv2gxl Command Examples
  8. kpackagetool5: command not found
  9. gh pr create: Manage GitHub pull requests from the command-line
  10. megatools-dl Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright