lsb_release

Linux · System · reference only

What it does

Shows information about the installed Linux distribution: name, version and codename.

Syntax

lsb_release [opciones]

Options and parameters

  • -a

    Shows all available information.

  • -i

    Shows the distributor ID.

  • -d

    Shows the distribution description.

  • -r

    Shows the release number.

  • -c

    Shows the release codename.

  • -s

    Short output: only the values, without labels.

Usage examples

  • lsb_release -a

    Shows distributor, description, release and codename.

  • lsb_release -d

    Shows a description such as Debian GNU/Linux 12 (bookworm).

  • lsb_release -cs

    Shows only the codename, useful to configure repositories.

  • lsb_release -rs

    Shows only the release number.

Notes and common mistakes

  • It belongs to the lsb-release package, which may not be installed on minimal systems.
  • You can also read the /etc/os-release file.

Related commands