How to Check CentOS Version Number

how to check centos version

centos version checkIf you don’t know, you are not alone.   When we get service inquiries, our customers often are unclear on the exact version of Linux they are using.  Fortunately, you can use these simple commands to get CentOS to show you the version numbers.

CentOS Version Check

The easiest way to check your CentOS version is via the command line.

Login to your CentOS server using SSH and run the following command:


cat /etc/centos-release

You may also use:

cat /etc/redhat-release

This should return the following CentOS version information:

CentOS release 6.2 (Final)

CentOS version history follows that of Red Hat but it could be delayed, which is just one of a few things you should know before running a CentOS server.

Let’s break this down:

CentOS – This is your Linux distribution. This may seem obvious but in doing outsourced support, we sometimes find surprises.

6.2 – There are two parts of this version number. 6 is the major release version for this Linux distribution. The 2 represents the second update for this release. Red Hat, Fedora and CentOS Linux distributions use this version system.

Kernel Versions

Know that you know your CentOS version, you may also want to check what kernel is running on your CentOS server. You can check which kernel you are using by running:

uname -a

This will return:

Linux 2.6.32-220.2.1.el6.x86_64 #1 SMP 
Fri Dec 23 02:21:33 CST 2011 ×86_64 ×86_64 ×86_64 GNU/Linux
If you use 3rd party repos, make sure you add the appropriate i386 or x86_64 bit versions of software.
You may notice that this is not the latest kernel, but this it typical. However, I don’t recommend picking a Linux distribution just because it runs the latest kernel. The most important thing is that you are running the latest kernel for our CentOS server.

This is the kernel that is actually running on your server. There you could be newer kernels installed on your CentOS server but not actually running. You can list the installed kernels using yum or rpm. You can then see which kernel will start on boot by checking your /etc/grub.conf.

If you run a CentOS server, keeping track of CentOS versions is important. The best way to do this is to follow the CentOS web site so you can stay on top of your chosen Linux distribution.

Also, be sure to check out the 6 things you should know about CentOS Linux.

The following two tabs change content below.

Juli Zurovec

Operations Manager at rackAID
Finding that her perfectionism met the demands of IT management, Juli pursued Red Hat training, then put her skills and knowledge to work at rackAID. Juli's obsession with detail and passion for problem-solving translates into a better night's sleep for rackAID clients, who know their operations are running smoothly.

Latest posts by Juli Zurovec (see all)


  • Chankey Pathak June 4, 2014 at 4:26 am

    Thanks. I wonder why cat /etc/redhat-release works and cat /etc/centos-release doesn’t on my CentOS?

    • Jeff Huckaby June 4, 2014 at 9:04 am

      I would have to check but I think the centos-release may only be in later versions of CentOS.

  • shanmukh June 18, 2014 at 11:29 pm

    how come cat /etc/redhat-release is displaying the centos version..can anyone pls comment on this.

    • Jeff Huckaby June 19, 2014 at 9:45 am

      That is normal. CentOS preserves that file since many other programs look for /etc/redhat-release and not /etc/centos-release.

  • tude July 31, 2014 at 5:25 am

    Centos 5 using file in /etc/redhat-release
    I don’t know in Centos 6 or above.

  • Lalit September 13, 2014 at 7:26 am

    cat /etc/centos-release works on my CentOS having version 6.5 Final

  • Fuller Suppend November 16, 2014 at 9:45 am

    I works for me and it says “CentOS 6.5 (final).”