How To Find Which Linux Kernel Version Is Installed On My System

I am a new proud Linux user. My question to you is – how do I check Linux Kernel version? How do I find my Linux Kernel Version installed on my PC? Any help would be greatly appreciated.

Introduction : The Linux kernel is the central (core) component of Linux operating systems. Its responsibilities include managing the system’s resources and the communication between hardware and software components.

Commands to find your Linux Kernel Version

To check Linux Kernel version, try the following commands:

  1. uname -r : Find Linux kernel version
  2. cat /proc/version : Show Linux kernel version with help of a special file
  3. hostnamectl | grep Kernel : For systemd based Linux distro you can use hotnamectl to display hostname and running Linux kernel version

Let us see all commands in details.

How to check kernel version on Linux server/desktop/laptop

You need to use then uname command to print certain system information including kernel name. Type the following command to print kernel version number:
$ uname -r
Sample outputs:

4.15.0-39-generic

So my Linux kernel version is 4.15.0-39.

Understanding uname command options

To print certain system information you use uname command. It has the following options:

-a, OR --all print all information
-s, OR --kernel-name print the kernel name
-n, OR --nodename print the network node hostname
-r, OR --kernel-release print the Linux kernel release
-v, OR --kernel-version print the kernel version
-m, OR --machine print the machine hardware name
-p, OR --processor print the processor type or “unknown”
-i, OR --hardware-platform print the hardware platform or “unknown”
-o, OR --operating-system print the operating system

Find Linux kernel using /proc/version file

Another option is to type the following cat command:
$ cat /proc/version
Sample outputs:

Linux version 4.19.2 ([email protected]) (gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)) #1 SMP Fri Nov 16 01:38:13 IST 2018

How to find your Linux Kernel version using hostnamect

Type the hostnamectl command along with grep command:
$ hostnamectl
$ hostnamectl | grep Kernel

Related media

This tutorial is also available in a quick video format:

Conclusion

You learned three diffent commands to display and show Linux kernel version on screen. For more info see the following pages too:

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.