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
CentOS Linux release 7.2.1511 (Core)
- CentOS is the distribution name
- 7 is major version number which is parallel with Red Hat for CentOS
- 2 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)