The lsb_release command displays LSB (Linux Standard Base) information about your specific Linux distribution, including version number, release codename, and distributor ID.

Syntax

lsb_release [OPTIONS]

Options

As with other GNU software, lsb_release uses a single dash (-) for short options, and two dashes (–) for long options.

  • Syntax
  • Options
  • Installing LSB Core
  • Examples
  • Related commands
  • Linux commands help

Installing LSB Core

lsb_release is part of a software package called the LSB core, which is not necessarily installed on your system by default.

To install it, run the command below that corresponds to your specific system:

Ubuntu, Debian

sudo apt-get update && sudo apt-get install lsb-core

CentOS

sudo yum update && sudo yum install redhat-lsb-core

Fedora

sudo dnf update && sudo dnf install redhat-lsb-core

OpenSUSE

sudo zypper update && sudo zypper install lsb-core

Arch

pacman -Syu lsb-release

Other distributions

If your Linux distribution is not listed here, consult your package manager’s repository for the package containing |lsb-core| and/or |lsb_release|.

Examples

lsb_release -a

Display all LSB information specific to your Linux distribution. Output resembles the following:

LSB Version: core-5.0-amd64:core-5.0-noarchDistributor ID: openSUSE projectDescription: openSUSE Leap 42.2Release: 42.2Codename: n/a

uname — Print information about the current system and its kernel.

If you receive a “No LSB modules are available” or similar message, you need to install the LSB core software first. See section Installing LSB Core above for more information.