Understanding the Linux operating system and kernel version
The Linux kernel (Linus Torvalds)
The kernel is the heart of the operating system. It acts as an intermediary between the hardware and the software (applications).
- Development: It was originally created by Linus Torvalds (1991). Today, it is further developed by the global community and the Linux Foundation (under Torvalds’ leadership).
- Customisation by distributions: Distros (Ubuntu, RHEL, Debian, etc.) use the ‘vanilla kernel’ (standard source code from kernel.org) and optimise it:
- Configuration: Disabling unnecessary features to enhance security or improve performance.
- Patches: Incorporating security patches or backports not yet included in the official kernel.
- Drivers: Integrating specific hardware support (modules).
- Architecture dependency: The kernel must be compiled for the respective CPU architecture:
- x86_64 (amd64): Standard for PCs and servers.
- ARM64 (aarch64): Raspberry Pi, Apple Silicon, modern cloud instances.
- RISC-V: Emerging open architecture.
- s390x: IBM mainframes.
Structure of a kernel version (mainline) using the example: 6.12.1:
* 6.12: Release
* 6: Major version.
* 12: Minor version (features).
* 1: Patch level (bug fixes).
Distributions
General Concept
- Modularity: Technically, the ‘kernel’ consists of several packages (image, headers, modules).
- Package management: Installation is carried out using tools such as
apt(Debian/Ubuntu) ordnf/yum(Red Hat). - Updates: An
apt upgradedoes not necessarily install a new major version immediately, but often the latest security update within the selected release line. - Backporting: Backporting means that a change (fix, feature or patch) from a newer software version is incorporated into an older version.
The kernel packages (image, modules, headers) must match exactly and therefore carry the identical version number.
Which packages are part of the kernel?
These are usually:
1. linux-image: The actual binary kernel.
2. linux-modules: Drivers and kernel extensions.
3. linux-headers: Required to compile custom drivers (e.g. NVIDIA) against the kernel.
4. linux-firmware: Binary data for hardware components (Wi-Fi, GPU).
Important commands for checking the kernel:
| Command | Purpose | Example |
|---|---|---|
uname -r |
Displays the currently running (active) kernel. | 5.15.0-173-generic |
uname -a |
Displays the kernel version, architecture and compilation date. | Linux prod-appstack-dcpu 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
dpkg --list | grep linux-image |
(Ubuntu) Lists all installed kernel images. | |
rpm -q kernel |
(Red Hat) Lists all installed kernel versions. |
Ubuntu (Debian-based)
Ubuntu often uses more up-to-date kernels than enterprise distributions and offers specialised variants.
- Specialised packages:
generic: Standard for most systems.lowlatency: For audio processing or real-time requirements.azure / aws / gcp: Optimised for specific cloud environments (includes special drivers and boot parameters).
- Multi-boot: Multiple kernel versions can be installed in parallel. The bootloader (GRUB) selects the latest one by default.
- HWE (Hardware Enablement) is an Ubuntu concept that ensures an LTS system receives newer Linux kernels and graphics stacks over time without the need to upgrade to a new Ubuntu version. Installing the HWE package automatically uses the kernel from the HWE track.
- Best practice: A reboot is essential after a kernel update. Afterwards,
sudo apt autoremoveremoves old kernel versions, but usually retains the penultimate one as a safety reserve.
Ubuntu LTS releases may use different kernel branches depending on the kernel strategy: * GA (General Availability): The main kernel branch remains constant across all point releases (e.g. 6.8.x). * HWE (Hardware Enablement): The main kernel branch may change with subsequent point releases (e.g. 6.8. → 6.11 → 6.14 → 6.17).
Versioning example: 6.17.0-23.23~24.04.1 (if HWE or Backport is installed) or 6.17.0-23.23 (generic)
* 6.17.0: The base kernel (upstream).
* 23: The Ubuntu ABI number (kernel revision).
* .23: The upload level (internal build number).
* ~24.04.1: Indicates a backport or HWE package provided specifically for the 24.04 release.
Red Hat Enterprise Linux (RHEL)
Red Hat follows a conservative strategy (‘Stability First’). They often use an older kernel base (e.g. 4.18 in RHEL 8) and incorporate modern features via ‘backporting’.
An RHEL OS release (e.g. RHEL 9) with its sub-versions (e.g. 9.0, 9.1, 9.2 etc.) is based across all sub-versions on a main kernel branch (5.14.0-x.x.x.el9_x).
Versioning example: 4.18.0-553.el8_10
* 4.18.0: The original upstream base (often remains the same throughout the entire lifecycle of the RHEL major version).
* 553: The Red Hat build number. The higher this number, the more fixes have been backported.
* el8_10: Designation for Enterprise Linux 8, Update Release 10.
* 0: (Prefix): This is the ‘Epoch’, a technical aid for the package manager to determine the priority of packages during updates.