lsb_release - print distribution-specific information
lsb_release [-a] [-i] [-d] [-r] [-c] [-s]
Options you will use
-a, --all- all of the fields below
-i, --id- distributor ID
-d, --description- description (the pretty name)
-r, --release- release number
-c, --codename- codename
-s, --short- values only, no labels (good for scripts)
Examples
$ lsb_release -awhich Ubuntu is this
$ lsb_release -csjust the codename, e.g. for an apt sources line
Gotchas
- /etc/os-release has the same facts and exists on every systemd distro; scripts should prefer it (
. /etc/os-release; echo "$VERSION_ID"). - "No LSB modules are available." goes to stderr and is harmless.
Try lsb_release in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.