Check what CentOS version you are running on your Linux system

There are several ways on how to check what version of CentOS is running on your system. The simplest way to check for the CentOS version number is to execute the:

 cat /etc/centos-release

What is the command to check CentOS version?

The following table contains most common and recommended ways on how to check CentOS version on your CentOS Linux server or desktop. 

Command Description
$ rpm -q centos-release CentOS version valid for CentOS 6 and higher. Causes to reveal major, minor and asynchronous CentOS version.
$ lsb_release -d Requires redhat-lsb package to be installed before execution.
$ cat /etc/centos-release Linux cat command to output content of the /etc/centos-release to query CentOS version. Works with CentOS 6 and higher.
  • 22 Users Found This Useful
Was this answer helpful?

Related Articles

How to upgrade Debian 8 Jessie to Debian 9 Stretch

How to upgrade Debian 8 Jessie to Debian 9 Stretch This knowledgebase article explains a system...

How to monitor my Linux system and gather statistics

You can use following Linux commands to help monitoring your Linux system performance, gather...

Check what Debian version you are running on your Linux system

The easiest way on how to check what Debian version you are running is to simply read a contents...