How to Check the Kernel Version in Linux

Knowing which kernel version is running on your system helps when troubleshooting hardware issues, checking whether a security patch applies, or verifying driver compatibility. This guide covers three ways to check the Linux kernel version from the command line.
Using the uname Command
The uname
command displays system information including the kernel name, version, and architecture.
The quickest way to print just the kernel release is uname -r:
uname -r6.8.0-49-genericFor more detail, add the -s and -m flags to include the kernel name and machine hardware:
uname -srmLinux 6.8.0-49-generic x86_64The output shows that this is a 64-bit Linux system running kernel 6.8.0-49. The components of the version string are:
6- Major version.8- Minor version (also called patchlevel).0- Sub-level (bug-fix increment).49- Distribution-specific patch number.generic- Build flavor set by the distribution.
To print all available system information at once, use uname -a.
Using the hostnamectl Command
The hostnamectl utility is part of systemd. It is used to query and change the system hostname, but it also shows the Linux distribution and kernel version. Use this method on systemd-based systems:
hostnamectl Static hostname: linuxize
Icon name: computer-laptop
Chassis: laptop
Machine ID: af8ce1d394b844fea8c19ea5c6a9bd09
Boot ID: 15bc3ae7bde842f29c8d925044f232b9
Operating System: Ubuntu 24.04.1 LTS
Kernel: Linux 6.8.0-49-generic
Architecture: x86-64You can use the grep
command to filter the kernel line:
hostnamectl | grep -i kernel Kernel: Linux 6.8.0-49-genericIf hostnamectl is not available on your system, use uname -r or cat /proc/version instead.
Using the /proc/version File
The /proc directory contains virtual files with information about system memory
, CPU cores
, mounted filesystems
, and more. The running kernel version is stored in /proc/version.
Use cat
or less
to display the file:
cat /proc/versionLinux version 6.8.0-49-generic (buildd@lcy02-amd64-080) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #49~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2024This output includes the compiler version and build date, which can be useful when verifying that a specific kernel patch was applied.
Conclusion
The fastest option is uname -r. Use hostnamectl when you also need the distro name, or read /proc/version when you need the full build details. For more on inspecting your system, see the uname command
guide.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page