Production environment:
OS: CentOS Release 6.7 (Final)
The first method:
[[Email protected]]# lsb_release-a
Bash:lsb_release:command not found
[[email protected]] #yum install Lsb–y
[[Email protected]]# 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
The second method:
[Email protected] sky]# cat/etc/redhat-release
Centosrelease 6.7 (Final)
The third method:
[Email protected] sky]# rpm-qcentos-release
Centos-release-6-7.el6.centos.12.3.x86_64
The fourth method:
[Email protected] sky]# cat/etc/issue
according to the actual situation to determine selection that way . , not every method will have an effect, and a first to second approach is recommended.
This article is from the "Linux~dba~mba~eie" blog, make sure to keep this source http://sky9896.blog.51cto.com/2330653/1730734
Four ways to view Linux system version number information such as CentOS