本文共 1390 字,大约阅读时间需要 4 分钟。
查看系统内核的方法:
1、uname -r
2、cat /proc/version
1 2 3 4 5 | [root@localhost ~] # uname -r 2.6.32-504.8.1.el6.i686 [root@localhost ~] # cat /proc/version Linux version 2.6.32-504.8.1.el6.i686 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Jan 28 18:25:26 UTC 2015 |
查看系统版本的方法:
1、cat /etc/issue
2、cat /etc/system-release 软连接文件,实际连接到centos-release
3、cat /etc/redhat-release 软连接文件,实际连接到centos-release
4、cat /etc/centos-release
5、rpm -qa | grep release
6、lsb_release -a
LSB是Linux Standard Base的缩写,lsb_release命令用来显示LSB和特定版本的相关信息,可通过yum -y install redhat-lsb命令安装。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | [root@localhost ~] # cat /etc/issue CentOS release 6.6 (Final) Kernel \r on an \m [root@localhost ~] # cat /etc/system-release CentOS release 6.6 (Final) [root@localhost ~] # cat /etc/redhat-release CentOS release 6.6 (Final) [root@localhost ~] # cat /etc/centos-release CentOS release 6.6 (Final) [root@localhost ~] # rpm -qa | grep release centos-release-6-6.el6.centos.12.2.i686 [root@localhost ~] # lsb_release -a LSB Version::base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch Distributor ID:CentOS Description:CentOS release 6.6 (Final) Release:6.6 Codename:Final 本文转自 模范生 51CTO博客,原文链接:http://blog.51cto.com/mofansheng/1624193,如需转载请自行联系原作者 |