Skip to main content

Command Palette

Search for a command to run...

How to Check Linux Kernel Version

Published
2 min read
How to Check Linux Kernel Version
P

As an experienced Linux user and no-code app developer, I enjoy using the latest tools to create efficient and innovative small apps. Although coding is my hobby, I still love using AI tools and no-code platforms.

Knowing your Linux kernel version is important to ensure compatibility with applications, drivers, and hardware. The kernel acts as the core interface between software and hardware, so an outdated kernel can cause issues. Thankfully, checking your Linux kernel version is simple. Here are the most common methods.

Use the uname Command

The easiest way to check your Linux kernel version is by using the uname command in your terminal:

uname -r

This will print out your kernel release number. A typical output would look like:

5.15.0-56-generic

This shows the kernel version is 5.15.0 and the release is 56 for Ubuntu/Debian-based systems.

You can also pass the -a flag to uname to get more detailed output:

uname -a

This adds information like the hostname, architecture, and operating system.

Check /proc/version

The /proc pseudo-filesystem contains details about your system. You can use cat to print out the Linux version info:

cat /proc/version

This will output details like your GCC version, kernel release, and more.

Use lsb_release

The lsb_release command prints out details about your Linux distribution. Pass the -a flag to show your kernel release:

lsb_release -a

The output includes your distro, release number, codename, and kernel version.

Check With /proc/sys/kernel

You can also navigate directly to /proc/sys/kernel to view kernel parameters and details.

For example, cat the osrelease and version files:

cat /proc/sys/kernel/osrelease
cat /proc/sys/kernel/version

This prints out the kernel release number and additional version info.

Use /etc/os-release

Recent Linux distributions include an /etc/os-release file with distro details, including the kernel version.

View it with cat:

cat /etc/os-release

Search for the VERSION_ID field to see your kernel release number.

Conclusion

Knowing your Linux kernel version helps ensure the software remains compatible and up-to-date. Use one of the above simple methods to quickly check your kernel release number and details from the terminal. Common tools like uname, lsb_release, cat, and viewing /proc provide access whenever needed.

More from this blog

T

TheTechDeck | Tech Made Simple for Everyone

772 posts

Explore the best tech tips and tricks for Windows, Mac, Linux, Android, and gaming. Simplify tech with TechUvy's expert guides