How To Get Centos, Fedora, Red Hat Release Version?

CentOS, Fedora, Red Hat are similar distibutions. Actually Red Hat supports other distributions. In this case how can I get release version of CentOS, Red Hat, Fedora. It is ver easy actually. These distributions holds release version related information in their /etc/redhat-release file. So simple echoing will give release information.

Get Release Information From redhat-release

Simple print this file into terminal

$cat /etc/redhat-release  
CentOS Linux release 7.2.1511 (Core)
  • CentOS is the distribution name
  • is major version number which is parallel with Red Hat for CentOS
  • is minor version number and other part is not so important

And an other example from Fedora

$ cat /etc/redhat-release  
Fedora release 24 (Twenty Four)

LEARN MORE  Awk Print Tutorial With Examples

Leave a Comment