生产环境:
OS:CentOS release 6.7 (Final)
第一种方法:
[root@sky9896sky]# lsb_release -a
bash:lsb_release: command not found
[root@sky9896sky]#yum install lsb –y
[root@sky9896sky]# lsb_release -a
LSBVersion: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
DistributorID: CentOS
Description: CentOS release 6.7 (Final)
Release: 6.7
Codename: Final
第二种方法:
[root@sky9896 sky]# cat /etc/redhat-release
CentOSrelease 6.7 (Final)
第三种方法:
[root@sky9896 sky]# rpm -qcentos-release
centos-release-6-7.el6.centos.12.3.x86_64
第四种方法:
[root@sky9896 sky]# cat/etc/issue
依据实际情况确定选用那种方法,并不是每一种方法都会有效果,建议采用第一、二种方法。
本文出自 “Linux~DBA~MBA~EIE” 博客,请务必保留此出处http://sky9896.blog.51cto.com/2330653/1730734
原文:http://sky9896.blog.51cto.com/2330653/1730734