Linux lsb_release command

Updated: 05/04/2019 by Computer Hope
lsb_release command

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


lsb_release [OPTIONS]


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

-v, --version Show the version of the Linux Standard Base your system is compliant with. The version is displayed as a colon-separated list of LSB module descriptions.
-i, --id Display the ID of your Linux distributor. For instance, if you are running Debian, this option displays
Distributor ID: Debian
Display a description of your Linux distribution. For instance, if you are running CentOS 7, this displays something like
Description: CentOS Linux release 7.3.1611 (Core)
-r, --release Display the release number of the current operating system. For instance, if you are running Fedora 25, this outputs
Release: 25
Display the codename of the current operating system. For instance, if you are running Ubuntu 16.04, this displays
Codename: xenial
-a, --all Display all the information above. For instance, if you are running Arch Linux, this displays
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
-s, --short Use the "short" output format, which omits headers. You can use this in combination with another option. For instance, if you are running Fedora 25, the command

lsb_release -rs

-h, --help Display a help message which summarizes these options.

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


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


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


sudo zypper update && sudo zypper install lsb-core


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|.


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-noarch
Distributor ID: openSUSE project
Description: openSUSE Leap 42.2
Release: 42.2
Codename: n/a

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.

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