Check CentOS Version

To check the version of CentOS, there are a couple of commands that we can use to do this:

rpm --query centos-release
example:
rpm --query centos-release
CentOS release 6.7 (Final)

Alternatively, use:

rpm --query centos-release
example:
rpm --query centos-release
centos-release-6-7.el6.centos.12.3.x86_64