e Learning

Commands to get CentOS 7 Kernel Version

In this tutorial we are going to learn how to get the kernel version of your CentOS 7 Linux computers.

So how do we find what version of Linux kernel our CentOS 7 server use?

Just like in any other Linux distribution uname -r command can be used to get CentOS 7 kernel version.

uname -r

get CentOS 7 kernel version using uname -r command

In CentOS 7 /proc/sys/kernel/osrelease file also contains the kernel information. We can read the file using cat command.

cat /proc/sys/kernel/osrelease

cat /proc/sys/kernel/osrelease display kernel information

As you can see both commands print the same information. So you can use either “uname -r” or cat /proc/sys/kernel/osrelease command to get CentOS 7 kernel version.