Applies to: Ubuntu 26.04 and 24.04, Debian 13, AlmaLinux 9 and 10; tested in Docker with Ubuntu kernel packages 7.0.0-14 and 7.0.0-34 and AlmaLinux 9.8 kernel-core 5.14.0-687

Run uname -r to see which kernel your server is running right now. It works on every Linux distribution and doesn’t need root. The kernel that is running can be older than the newest kernel installed, so after updates also list the installed kernels and check whether a reboot is waiting.

Check the running kernel

$ uname -r
6.12.54-linuxkit
$ uname -srm
Linux 6.12.54-linuxkit aarch64
$ cat /proc/version
Linux version 6.12.54-linuxkit (root@buildkitsandbox) (gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, GNU ld (GNU Binutils) 2.42) #1 SMP Tue Nov  4 21:21:47 UTC 2025
  • uname -r: the kernel release only.
  • uname -srm: kernel name, release and architecture (x86_64 or aarch64). uname -a adds the host name and build date.
  • /proc/version: also shows the compiler that built the kernel.

This output comes from our Docker test lab. A container has no kernel of its own, so it always shows the host’s kernel (here Docker Desktop’s). A KVM VPS or a dedicated server boots its own kernel, and you see the distribution’s version instead, such as 7.0.0-34-generic on Ubuntu 26.04 or 5.14.0-687.52.1.el9_8 followed by the architecture on AlmaLinux 9.8.

Reading the version number

  • Ubuntu 7.0.0-34-generic: according to Ubuntu’s kernel team, 7.0.0 is the upstream Linux version it is based on, 34 is the ABI number and generic is the flavour. The package version (7.0.0-34.34) adds an upload number.
  • Debian 13 6.12.111+deb13-arm64: Linux 6.12.111, built for Debian 13, for 64-bit ARM (package linux-image-6.12.111+deb13-arm64).
  • AlmaLinux and RHEL 5.14.0-687.52.1.el9_8: based on Linux 5.14, followed by the distribution’s own build number. el9_8 means Enterprise Linux 9.8. These releases keep the same base version for their whole life and add fixes to it, so 5.14 on AlmaLinux 9 isn’t out of date.

List the installed kernels

On Ubuntu and Debian:

$ dpkg --list 'linux-image*' | grep ^ii
ii  linux-image-7.0.0-14-generic          7.0.0-14.14  arm64        Signed kernel image generic
ii  linux-image-7.0.0-34-generic          7.0.0-34.34  arm64        Signed kernel image generic

ls /boot shows the same kernels as vmlinuz-7.0.0-14-generic and vmlinuz-7.0.0-34-generic. On AlmaLinux, Rocky Linux and RHEL:

$ rpm -q --last kernel-core
kernel-core-5.14.0-687.52.1.el9_8.aarch64     Wed Sep 30 03:22:10 2026

We query kernel-core because it is always there; rpm -q kernel also works on a normal server install, but a minimal system can answer package kernel is not installed, as our test container did. DNF keeps at most three kernels installed (installonly_limit=3 in /etc/dnf/dnf.conf), so older ones are removed as new ones arrive; the running kernel is protected.

Check whether a reboot is waiting

If uname -r is older than the newest installed kernel, the server needs a reboot to use it. Ubuntu Server also leaves a flag file when an update asks for a restart (from the update-notifier-common package, which Ubuntu Server installs):

$ cat /run/reboot-required /run/reboot-required.pkgs
*** System restart required ***
linux-image-7.0.0-14-generic
linux-base

If the file doesn’t exist, no update has asked for a reboot. On AlmaLinux and Rocky Linux, sudo dnf needs-restarting -r tells you, and returns exit code 1 when a reboot is needed.

When you are ready, reboot from the command line, then run uname -r again. cPanel servers that still show the old kernel in WHM after the reboot need their system information refreshed.

The latest Linux kernel

At the time of writing, kernel.org lists 7.2.8 as the latest stable kernel, 7.3-rc5 as the mainline test release, and 6.18, 6.12, 6.6, 6.1, 5.15 and 5.10 as long-term branches. A server doesn’t need the newest one. Use the kernel your distribution ships, because it receives security updates with the rest of the system:

  • Ubuntu 26.04 LTS: 7.0 (linux-image-generic 7.0.0-34)
  • Ubuntu 24.04 LTS: 6.8 (6.8.0-142), or 7.0 from the HWE package linux-image-generic-hwe-24.04
  • Debian 13: 6.12 (6.12.111)
  • AlmaLinux 10: 6.12.0; AlmaLinux 9: 5.14.0

More: find out which Linux distribution and version you run and remove the rescue kernel with grubby.

Official documentation: kernel.org releases, uname(1) and dnf needs-restarting.

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)