How to Check CentOS Version

Question: How to check CentOS version?
Sometimes you may need to check the version of CentOS installed on your machine. Here are some different ways by which you can find the version of CentOS the machine is running.
LSB Release:
lsb_release is a command that prints certain LSB (Linux Standard Base) and Distribution information
lsb_release -a
Output:
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.3.1611 (Core)
Release: 7.3.1611
Codename: Core
From the above output, 7.3.1611 confirms the machine is running with CentOS 7.3.
System Release:
You can also get the system version by querying the centos-release package.
rpm -qa | grep -i centos-release
Output:
centos-release-7-3.1611.el7.centos.x86_64
Release Files:
Finally, you can also get the CentOS version details by taking a look at /etc/system-release and /etc/redhat-release.
cat /etc/system-release
OR
cat /etc/redhat-release
Output:
CentOS Linux release 7.3.1611 (Core)
That’s All.