操作系统、内核版本查询

时间:2021-11-27 14:24:20

1、操作系统版本
方法1:lsb_release -a

[root@TiaoBan-1 ~]# lsb_release -a
LSB Version: :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 Linux release
6.0 (Final)
Release:
6.0
Codename: Final

方法2:cat /etc/issue 

[root@TiaoBan-1 ~]# cat /etc/issue
CentOS Linux release
6.0 (Final)
Kernel \r on an \m

 操作系统版本为:CentOS Linux release 6.0 (Final)

 

2、内核版本
方法1:uname -a

[root@TiaoBan-1 ~]# uname -a
Linux TiaoBan
-1 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

方法2:cat /proc/version

[root@TiaoBan-1 ~]# cat /proc/version 
Linux version
2.6.32-71.el6.x86_64 (mockbuild@c6b6.centos.org) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Fri May 20 03:51:51 BST 2011

内核版本为:2.6.32-71.el6.x86_64