如何查看CentOS版本
1、这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版:
# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarchDistributor ID: CentOSDescription: CentOS release 5.4 (Final)Release: 5.4Codename: Final
2、RedHat,CentOS:
[email protected] ~ # unameLinux
root@192.168.100.1 ~ # uname -r2.6.18-164.el5
root@192.168.100.1 ~ # cat /etc/redhat-release
CentOS release 6.3 (Final)
登录到linux执行rpm -q redhat-release
root@192.168.100.1 ~ # rpm -q centos-release
centos-release-6-3.el6.centos.9.x86_64