Different ways you can check the CentOS version, and the Linux kernel version that you are using

If you are new on Linux, you sometimes need to get assistance from the internet for your everyday tasks. While searching for the specific issue online, you can get the solution in the quickest possible way, if you are specific in describing your problem. When you try to describe your problem, you undoubtedly have to enter the name of the distribution that you are using, and depending upon the actual problem that you are facing, you might need to be more specific, and you might have to enter that version of the Linux distribution that you are using.

As a Linux Kernel can also get updated in the newer versions of a Linux distribution that you might be using, depending upon the minor updates, some things might get changed. In such a situation, entering the complete version can be useful for the online community to help you troubleshoot your problem. If you are using CentOS, which is a derivative of highly popular Red Hat Linux, I will talk about how you can check the version number, so that we can get a solution online, or make sure that you are using the latest version of CentOS. There can be a number of reasons, you might need to know the version of CentOS that you are using.

So today I will talk about, how to check the CentOS version in the Linux command line. Without any further delay, let’s get started with the different ways you can do that.

Open a Linux terminal, and type in the following command before hitting the enter key.

Knowing the major version of CentOS or Ubuntu

cat /etc/os-release

As you can see in the screenshot below, this will ensure that you are actually using a Linux distribution, and it will also display the major version of CentOS that you are using. This can be useful in certain situations, but the information is not specific.

CentOS version check 10

Knowing the complete version of CentOS

cat /etc/centos-release


cat /etc/redhat-release

For Ubuntu the same command used earlier:

cat /etc/os-release

You can either use any of the following commands to see the complete version of the CentOS that you are using. The breakup of the version of the CentOS version that you are using is shown in the screenshot below.

CentOS version check 20
check ubuntu or centOS Linux OS or kernal version

Checking the CentOS and the Linux kernel version

Note: You can use the commands on Ubuntu as well.


Sometimes it becomes necessary to check the complete version of CentOS that you are using, along with the Linux kernel version. Besides that, you can also find information about your machine ID, boot ID, System architecture, to check whether the CentOS version is 32 or 64 bit, and a number of other small pieces of information.

CentOS version check 30

Checking only the kernel version

uname -r

Though, not important every single time, but sometimes you might need to see just the Linux kernel version, and that’s when the following command can be useful.

CentOS version check 40

So, those were the ways, you can see the CentOS version that you are using, without installing any third-party apps or programs. If you are working in an organization, and the system administrator suddenly asks you about the Linux version or the CentOS version you are using, you can use any of the following commands to check the CentOS or the kernel version, and instantly tell that to the system administrator.

So that was all about, how you can see the version of CentOS that you are using. Do you have any questions? Feel free to comment on the same below.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.