Способ №1
В CentOS 6 есть фаил /etc/centos-release и две ссылки на него, /etc/redhat-release и /etc/system-release.
Так что кому как нравится
[xxx@localhost /]$ cat /etc/centos-release
[xxx@localhost /]$ cat /etc/redhat-release
[xxx@localhost /]$ cat /etc/system-release
ответ будет одинаков
[xxx@localhost /]$ CentOS Linux release 6.0 (Final)
Способ №2
Должна быть установлена базовая библиотека redhat-lsb
$ lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS Linux release 6.0 (Final)
Release: 6.0
Codename: Final
В CentOS 6 есть фаил /etc/centos-release и две ссылки на него, /etc/redhat-release и /etc/system-release.
Так что кому как нравится
[xxx@localhost /]$ cat /etc/centos-release
[xxx@localhost /]$ cat /etc/redhat-release
[xxx@localhost /]$ cat /etc/system-release
ответ будет одинаков
[xxx@localhost /]$ CentOS Linux release 6.0 (Final)
Способ №2
Должна быть установлена базовая библиотека redhat-lsb
$ lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS Linux release 6.0 (Final)
Release: 6.0
Codename: Final