How to Check Your Linux Kernel Version in Ubuntu Using uname -r

Why You Need Your Kernel Version

The Linux Kernel is the core engine of the Ubuntu operating system, acting as the critical bridge between your software applications and the physical hardware (CPU, RAM, networking cards). While standard Ubuntu system updates generally handle everything seamlessly in the background, you will occasionally need to know exactly which kernel version you are running. This is vital when you are manually installing proprietary graphics drivers (like Nvidia), attempting to compile custom software from source code, or troubleshooting a severe hardware compatibility issue where a specific piece of networking gear only works on older kernel versions.

Using the uname Command

The fastest and most universally reliable way to check your kernel version across any Linux distribution is by using the uname (Unix Name) command.

  1. Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
  2. The uname command on its own simply outputs “Linux,” which isn’t helpful. You must append the -r (release) flag to specifically request the kernel version.
  3. Type the following command:
    uname -r
  4. Press Enter.

How to Read the Output

The terminal will instantly return a string of numbers that looks something like this: 6.5.0-27-generic.

This string is highly structured:

  • 6: The main kernel version (the major architectural release).
  • 5: The major revision (new features and massive driver additions).
  • 0: The minor revision (bug fixes and security patches).
  • 27: The specific patch or build number compiled by Canonical (the company behind Ubuntu).
  • -generic: This indicates the specific flavor of the kernel. “Generic” means it is built for standard desktop and server hardware. (You might occasionally see “-lowlatency” for audio production or “-aws” for a cloud server).

You can copy this exact string to ensure you download the perfectly matching header files for your specific hardware drivers.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.