The Linux Kernel

In short
  • The kernel is the lowest layer of a Linux system — everything else runs on top of it.
  • New mainline versions are released roughly every couple of months. A few are designated as long-term support (LTS).
  • Your distribution decides which kernel you actually run; LTS distributions tend to follow LTS kernels.
  • For most users, taking the kernel updates the distribution ships is the right default. Building from kernel.org is rarely necessary.

What "the Linux kernel" actually is

When people say "Linux", they sometimes mean a complete operating system and sometimes mean just the kernel. Strictly, the kernel is a single program — the first one the bootloader hands control to — that mediates between hardware and everything else. It owns the schedulers that decide which processes get CPU time, the memory manager, the filesystem layer, the network stack, the device drivers and the system-call interface that user-space programs use to ask for any of those services.

Everything else on a Linux system — the shell, the desktop, the package manager, the web browser — runs in user space and reaches the kernel only through system calls. A Linux distribution is the kernel plus a carefully chosen set of user-space software, package management and policies that make the whole thing usable.

How kernel versions are organised

Kernel development happens in a single public Git repository maintained by Linus Torvalds. Two streams of releases come out of that repository:

Mainline

The mainline branch is where new features land. A mainline release goes through a two-week merge window during which subsystem maintainers send new code to Linus, followed by several weekly release candidates as bugs get found and fixed. When Linus considers the result stable, he tags a release and the cycle starts over. In practice, mainline releases come out every couple of months.

Stable

Each mainline release becomes the seed of a stable branch maintained for some period of time. Stable maintainers backport bug and security fixes to those branches without adding new features. Most stable branches are short-lived; a small number are designated long-term support (LTS) and maintained for several years.

Distribution kernels are almost always derived from a stable or LTS branch, with additional patches layered on top by the distribution itself.

Which kernel you actually run

The kernel that boots on your system isn't the one you'd get by downloading the latest tarball from kernel.org. Each distribution chooses a base version, applies its own patches (for backports, hardening, driver inclusion or compatibility), and packages the result.

  • Conservative LTS distributions — for example Debian stable and Ubuntu LTS — tend to follow an LTS kernel branch. They focus on bug and security fixes rather than version bumps, which is usually what you want on a server.
  • Faster-moving distributions — Fedora, Ubuntu interim releases, openSUSE Tumbleweed — track recent mainline releases more closely. You get newer hardware support and newer features sooner, at the cost of a more frequent moving target.
  • Rolling-release distributions — Arch and its derivatives — generally ship the most recent mainline stable kernel once it lands in the package repository.
  • Some distributions also offer alternative kernels in their repositories. Ubuntu, for example, ships hardware-enablement (HWE) kernels for LTS users who want newer drivers; Arch ships a long-term kernel under linux-lts for users who want a slower cadence.

To check which kernel you're actually running:

uname -r

This prints the running kernel's version string. The contents of /lib/modules/$(uname -r)/ show which modules are available for that kernel.

When it's worth updating

The kernel is in some ways the easiest part of a Linux system to leave alone. As long as the distribution is still in support and your security updates are flowing, you're already getting the relevant fixes. There are a few situations where a deliberate update is worth considering:

  • New hardware that the running kernel doesn't fully support. Particularly common with new Wi-Fi chipsets, GPUs and laptop power-management hardware. Upgrading to a HWE kernel (on Ubuntu LTS) or a newer point release (on Fedora) is often enough.
  • A specific kernel feature is needed. For example, a newer filesystem, a recent eBPF interface or a Wayland-related fix. The kernel changelog and the distribution's announcement notes will mention these.
  • A reported security issue affects your configuration. See the Linux security overview for how to read those advisories.

Building a kernel from source is a legitimate exercise but is rarely necessary on a desktop or server in 2020s Linux. If you do find yourself doing it regularly, that usually means the distribution you've chosen is no longer the right fit — switching to one with a faster kernel cadence is often a better answer.

Reading the kernel changelog

The most readable summary of what changes between mainline releases is the editorial coverage at LWN.net, which publishes detailed merge-window writeups for every cycle. The kernel's own changelog is generated from the commit history and lives under cdn.kernel.org; the per-version ChangeLog file is short, but the git log behind it is exhaustive.

Distribution kernels also publish their own changelogs in the package metadata. On Debian and Ubuntu, apt changelog linux-image-generic (or the equivalent meta-package) prints them; on Fedora, dnf changelog kernel serves the same purpose.

Updating the kernel on your distribution

Because the kernel is just a package, updating it follows the normal package-manager workflow for your distribution:

Debian and Ubuntu
sudo apt update
sudo apt upgrade
sudo reboot
Fedora
sudo dnf upgrade --refresh
sudo reboot
Arch Linux
sudo pacman -Syu
sudo reboot
openSUSE
sudo zypper refresh
sudo zypper update
sudo reboot

An updated kernel package only takes effect after the next boot. The previous kernel typically stays installed alongside it, so if the new one misbehaves you can pick the older one from the bootloader. The systemd basics page covers systemctl reboot and how the boot-time targets work.

Where to follow upstream

  • kernel.org — the canonical source for mainline and stable releases. The front page lists the current release of each maintained branch.
  • LWN Kernel — long-form editorial coverage of patches, design discussions and merge windows.
  • The Linux kernel mailing list (LKML) — the primary development forum. Mostly of interest if you're tracking specific subsystems.

Related reading on this site