Identify Your Distribution with lsb_release -a

lsb_release prints the distributor ID, description, release number, and codename — the classic way to answer 'which distro is this?'.

Linuxscriptingdistrosystem-infoLow risk
Run `lsb_release -a` to print the distribution's ID, description, release version, and codename in one block.

01Command

Command
$ lsb_release -a

02What it does

On Debian/Ubuntu derivatives, lsb_release is the traditional tool, and its per-field flags (-i, -r, -c, -s for short output) make it the easiest to use in shell scripts. It is often not installed on minimal systems, where `/etc/os-release` (read it with `cat /etc/os-release` or `. /etc/os-release`) is the universal fallback that works everywhere. The short flag combination `lsb_release -ds` yields just the clean description line.

03Risk

RiskLow risk
Requirementslsb_release package (apt install lsb-release on Debian/Ubuntu; preinstalled on many desktop distros).

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-17 · Category: System & Settings