How to Check Kernel Version in Linux
-
Use the
uname -r
Command to Check Kernel Version in Linux -
Use the
Cat
Command to Check Kernel Version in Linux -
Use the
hostname
Command to Check Kernel Version in Linux
The kernel
is an integral part of the Linux operating system that interfaces between the computer hardware and software processes. The main responsibilities of the Linux kernel are resource management such as memory, CPU, drivers, and system calls.
The Kernel manages memory and records of each file in Kernel space that is Kernel’s working area. The Linux kernel is also responsible for system security and communication between software and hardware components.
Bash has many commands to find Linux Kernel, such as uname -r
, cat /proc/version
, and hostnamectl | grep Kernel
.
Use the uname -r
Command to Check Kernel Version in Linux
The command below will print the Kernel name, Kernel version, and other system information.
uname -r
Output:
5.4.0-54-generic
Description of the output:
Use the Cat
Command to Check Kernel Version in Linux
The command below will print the Kernel name, Kernel version, Linux version, time, and date.
cat /proc/version
Output:
Linux version 5.4.0-54-generic (buildd@lcy01-amd64-024) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020
Use the hostname
Command to Check Kernel Version in Linux
The command below will also print the Kernel name, Kernel version, and other system information.
hostnamectl | grep Kernel
Output:
Kernel: Linux 5.4.0-54-generic
Husnain is a professional Software Engineer and a researcher who loves to learn, build, write, and teach. Having worked various jobs in the IT industry, he especially enjoys finding ways to express complex ideas in simple ways through his content. In his free time, Husnain unwinds by thinking about tech fiction to solve problems around him.
LinkedIn