查看操作系统版本信息的命令很多,下面列出一些常用的查看方式:
1.uname -a
[root@localhost ~]
Linux localhost.localdomain 2.6.32-642.el6.x86_64
[root@localhost ~]
2.cat /etc/issue
[root@localhost ~]
CentOS release 6.8 (Final)
Kernel \r on an \m
Mage Education Learning Services
http:
//www
.magedu.com
[root@localhost ~]
3.lsb_release -a 如命令不能使用,需要安装redhat-lsb--->yum install -y redhat-lsb.x86_64
[root@localhost ~]
LSB Version: :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
Distributor ID: CentOS
Description: CentOS release 6.8 (Final)
Release: 6.8
Codename: Final
[root@localhost ~]
4.cat /etc/redhat-release
[root@localhost ~]
CentOS release 6.8 (Final)
[root@localhost ~]