A kernel is a computer program and it provides an interface between software and hardware of a computer system. One of the core responsibilities of Kernel is to pass commands or instructions from applications to the underlying hardware of the CPU and return the result. You can read more about the kernel on the Wikipedia page.
Here at Ibmi Media, we shall look into different ways of checking the kernel version in Ubuntu 20.04.
Different methods of Checking Kernel Version in Ubuntu 20.04:
1. Checking Kernel Version via uname command
Uname prints the system information including operating system name, kernel release and version etc.
Execute the uname command with -r option:
$ uname -r
2. Checking Kernel Version via hostnamectl command
Execute the following command and look for the 'Kernel':
3. Checking Kernel Version via /proc/version file
You can check the kernel version by viewing the content of the/proc/version file:
$ cat /proc/version
4. Checking Kernel Version via dmesg command
Dmesg command is used to print kernel related messages on the terminal.
Run the dmesg command along with grep to extract the kernel version from the output:
$ sudo dmesg | grep -i linux