What is the lsb_release command?

Overview

We use the lsb_release command in Bash to get Linux Standard Base (LSB) details and distribution-specific information about the specific Linux distribution currently in use.

This information includes the version number, release codename, and distributor ID.

Syntax

lsb_release [options]

Options available

The different options available are as follows:

Option Description
-v or --version This option displays the version of the LSB against which our current installation is compliant.
-i or --id This option displays the Linux distributor ID.
-d or --description This option displays the description of the currently installed distribution.
-r or --release This option displays the release number of the currently installed distribution.
-c or --codename This option displays the codename of the currently installed distribution.
-a or --all This option displays information from all the above options.
-s or --short This option uses the “short” output format that omits headers.

Example

lsb_release -a

In the code above, we use the -a option to retrieve information about the Linux distribution on which this command is run.

Free Resources