Check what CentOS version you are running on your Linux system Print

  • check, centos, version, release, command, how, to
  • 31

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.

Was this answer helpful?

« Back