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
-aShows all available information.
-iShows the distributor ID.
-dShows the distribution description.
-rShows the release number.
-cShows the release codename.
-sShort output: only the values, without labels.
Usage examples
lsb_release -aShows distributor, description, release and codename.
lsb_release -dShows a description such as Debian GNU/Linux 12 (bookworm).
lsb_release -csShows only the codename, useful to configure repositories.
lsb_release -rsShows 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.