查看系统/内核版本

一、查看Linux内核版本命令(两种方法):

1、cat /proc/version

[root@localhost ~]# cat /proc/version
Linux version 3.10.0-123.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Mon Jun 30 12:09:22 UTC 2014

 

2、uname -a

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

 

二、查看Linux系统版本的命令(3种方法):

1、lsb_release -a,即可列出所有版本信息:

[root@jet-test-server1 一 4月 17 10:49:18 ~]# lsb_release -a
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.6 (Final)
Release:    6.6
Codename:    Final

 

这个命令适用于所有的Linux发行版,包括Redhat、SuSE、Debian…等发行版。(centos7不适用)

2、cat /etc/redhat-release,这种方法只适合Redhat系的Linux:

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

 

3、cat /etc/issue,此命令也适用于所有的Linux发行版。

[root@jet-test-server1 一 4月 17 10:56:04 ~]# cat /etc/issue
CentOS release 6.6 (Final)
Kernel \r on an \m

不适用centos7

[root@localhost ~]# cat /etc/issue
\S
Kernel \r on an \m

 

posted @ 2017-04-17 10:58  陈浩然201  阅读(585)  评论(0编辑  收藏  举报