[Ubuntu] Check the OS version from the command line

Created on November 30, 2026

Read /etc/lsb-release with cat on Ubuntu systems that provide the file.

cat /etc/lsb-release

Example output from Ubuntu 20.04

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
Ubuntu