The Kernel Identity Extraction Vector
Unlike consumer operating systems that loudly broadcast their branding upon boot, a headless Ubuntu server operates in a sterile, text-only matrix. The Canonical development team maintains two distinct release pipelines: standard releases (supported for 9 months) and Long Term Support (LTS) releases (supported for 5 years). If you are attempting to deploy a complex software architecture like a Kubernetes cluster, or if you need to add a third-party PPA repository to your package manager, you must know your exact OS release string. Applying a `20.04` configuration file to a `22.04` kernel will result in catastrophic dependency fractures.
How to Check Ubuntu Version
The Linux architecture provides several redundant commands to extract the release telemetry directly from the core configuration files hidden within the `/etc/` directory.
1. Open your terminal application or connect to the server via SSH.
2. Method 1: The Master OS Release Command (`lsb_release`):
* This is the mathematically superior and most standardized execution pathway. It utilizes the Linux Standard Base utility to output a clean, human-readable matrix.
* Type exactly:
lsb_release -a
* Press Enter.
* The Diagnostic Dump: The terminal will instantly output four rows of telemetry. The Description line contains the full alphanumeric string (e.g., `Ubuntu 22.04.3 LTS`), and the Release line outputs the exact mathematical version number (e.g., `22.04`).
3. Method 2: The Core File Interrogation (`cat /etc/os-release`):
* If the `lsb_release` utility is mathematically absent from a minimal Docker container installation, you must interrogate the static configuration file directly.
* Type exactly:
cat /etc/os-release
* Press Enter.
* The Output Matrix: The shell will dump a block of variables. Look specifically for the line beginning with `PRETTY_NAME=` (e.g., `PRETTY_NAME=”Ubuntu 20.04.6 LTS”`).
4. Method 3: The Bare Kernel Interrogation (`uname -r`):
* If you do not need the Canonical marketing name (like “Jammy Jellyfish”), but instead require the absolute, raw mathematical version of the Linux kernel itself (to verify hardware driver compatibility).
* Type exactly:
uname -r
* Press Enter.
* The system will output a sterile numerical string representing the core architecture (e.g., `5.15.0-89-generic`).