Linux

How to Check Linux Kernel Version: 4 Reliable Terminal Methods

Learn how to quickly check your current Linux kernel version using the terminal. This guide covers essential commands for any distribution.

Updated at April 6, 2026
3-5 min
Easy
FixPedia Team
Применимо к:Ubuntu 20.04/22.04/24.04+Debian 11+CentOS/RHEL 8+Fedora 36+

Introduction / Why This Matters

Knowing the exact Linux kernel version is necessary when installing proprietary drivers, configuring containers, or troubleshooting hardware conflicts. Software developers often specify minimum kernel requirements (e.g., 5.10+ for Btrfs feature support or latest Wi-Fi modules). Without this information, installing dkms drivers or updating security packages may fail due to compatibility issues. This guide will show you how to retrieve the information in seconds without installing additional utilities.

Requirements / Preparation

  • Access to a terminal emulator (GNOME Terminal, Konsole, xterm, etc.).
  • Standard user privileges are sufficient. Elevated privileges (sudo) will only be needed for one of the methods.
  • The article has been tested on distributions with kernel series 4.x, 5.x, and 6.x. The command syntax is universal.

Step 1: Use the uname Command

The fastest and most standard method is the uname utility. It queries kernel system calls and returns them in a readable format.

uname -r

The command outputs only the release number, for example 6.8.0-45-generic. This is sufficient for finding drivers or checking software requirements.

💡 Tip: To see the processor architecture and full hostname, run uname -a. To check only the architecture, use uname -m.

Step 2: Check the /proc/version File

The pseudo-filesystem /proc stores metadata of the running OS in real-time. Reading this file will show not only the version but also information about the compiler used to build the kernel.

cat /proc/version

The output will contain a line like Linux version 6.5.0-41-generic (buildd@lcy02-amd64-010) (gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) #41-Ubuntu SMP PREEMPT_DYNAMIC. The first set of numbers after version is your current build.

Step 3: Use the hostnamectl Utility

In modern systemd-based distributions, this utility collects and displays system metadata. It is convenient for server administrators because it outputs data in a structured format.

hostnamectl | grep Kernel

The result will look like: Kernel: Linux 6.5.0-41-generic. This method requires no string parsing and returns the clean value directly.

Step 4: Extract Data from dmesg (Alternative Method)

If standard utilities are missing for some reason in a minimal build, you can refer to the kernel boot log.

sudo dmesg | grep "Linux version"

⚠️ Important: Reading the dmesg buffer may require root privileges in newer distributions. The line prints the message the kernel outputs during system initialization, so it accurately reflects the loaded release.

Verifying the Result

Compare the obtained number with the documentation of the software you are installing. Pay attention to the digits before the first hyphen (e.g., 6.5.0). This is the main kernel branch. If it matches the developer's requirements, you can safely proceed with compiling modules or updating packages. To archive the information, redirect the output to a file: uname -r > ~/kernel_version.txt.

Potential Issues

  • command not found: Ensure you are using a standard bash or zsh shell. In extremely stripped-down environments (e.g., BusyBox), commands may have limited syntax. In this case, use cat /proc/version.
  • Kernel version mismatch in a container: In Docker or LXC, uname -r will show the host machine's kernel version, as containers share the host OS kernel. This is an architectural limitation, not an error.
  • dmesg access error: If dmesg returns Permission denied, the system has restricted reading the kernel buffer for regular users. Run the command with sudo or use journalctl -k | head -n 20.

F.A.Q.

Can I check the kernel version without terminal access?
Does updating the kernel affect system stability?
Why do commands show different version numbers?
How to check if the system uses a 32-bit or 64-bit kernel?

Hints

Launch terminal
Use the uname command
Check the /proc/version file
Use the hostnamectl utility

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community