The OS Telemetry Interrogation
Unlike proprietary operating systems that rely on vague, marketing-driven names (like “Ventura” or “Windows 11”), the Ubuntu architecture is strictly defined by numerical, timestamp-based release parameters (e.g., `22.04 LTS` indicates a release in April 2022). If you are compiling complex C++ software, troubleshooting a package dependency failure, or verifying if your Long Term Support (LTS) kernel is approaching its end-of-life, guessing your OS build is mathematically dangerous. You must interrogate the core Linux kernel to extract the absolute, definitive version string directly from the master release registry.
How to Check Ubuntu Version
The UNIX architecture provides a dedicated, highly optimized utility specifically designed to query the Linux Standard Base (LSB) telemetry data, ensuring you receive the exact alphanumeric payload.
1. Open your terminal application or connect to the server via SSH.
2. Method 1: The LSB Release Command (The Standard Protocol):
* This is the mathematically superior and most commonly accepted method for extracting the OS string.
* Type exactly:
lsb_release -a
* Press Enter.
* The Diagnostic Dump: The kernel instantly parses the registry and outputs a structured matrix of data.
* Distributor ID: Ubuntu
* Description: The full human-readable string (e.g., `Ubuntu 22.04.3 LTS`).
* Release: The critical mathematical identifier (e.g., `22.04`).
* Codename: The internal Canonical identifier (e.g., `jammy`).
3. Method 2: The Core Registry Interrogation (`/etc/os-release`):
* If the `lsb_release` utility is missing from your minimal server container, you must manually parse the core text file where the OS natively stores its own identity.
* Type exactly:
cat /etc/os-release
* Press Enter.
* The Execution: The `cat` utility dumps the raw contents of the file directly into your terminal. Look specifically for the line starting with `PRETTY_NAME=` (e.g., `PRETTY_NAME=”Ubuntu 20.04.6 LTS”`).
4. Method 3: The Kernel Architecture Query (`uname`):
* If you need to know the specific mathematical version of the Linux kernel itself (not just the Ubuntu wrapper), you must use a different command.
* Type exactly:
uname -r
* Press Enter. The system will output the raw kernel build (e.g., `5.15.0-89-generic`).