Back to the command reference

lsb_release

SystemBeginnerReference only

Show Linux distribution information

Name: lsb_release = Linux Standard Base release

This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.

Description

lsb_release shows the distribution's name, version and code name. Not every distribution installs it; /etc/os-release has the same information.

Syntax

lsb_release [OPTION]...

Common options

-a / --allAll information
-d / --descriptionThe full name of the distribution
-r / --releaseThe release number
-c / --codenameThe code name (such as noble)
-i / --idThe distribution (such as Ubuntu)
-s / --shortValues only, without labels (for scripts)

Examples

  • $ lsb_release -a

    e.g. Ubuntu 24.04 LTS

    Explain
  • $ cat /etc/os-release

    Alternative when lsb_release is missing

    Explain

Related