To examine the version of your Linux kernel and CentOS installation.
System running CentOS.
Step 1: Check Linux Kernel Version
You can check your linux system information, including the kernel version and release with the following command.
The command will generate a series of information as such.
The information above shows your Linux kernel version.
Step 2: Check CentOS Version using cat command
By default, CentOS has a file which records its version, known as centos-release, this file can be viewed by using the following command.
The command will generate information as such.
CentOS Linux release 7.8.2003
Shown below is the breakdown of the command output:
-> major release
-> minor release
-> asynchronous release
Step 3: Checking CentOS Version using hostnamectl command
On CentOS 7 and above, you can use the following command to quickly check the CentOS version, alongside other information.
The command would show the following output: