查看Linux系统版本信息

一、查看Linux内核版本命令(两种方法):
1、cat /proc/version

 [root@11 ~]# cat /proc/version
  Linux version 3.10.0-514.26.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Jul 4 15:04:05 UTC 2017

2、uname -a

[root@11 ~]# uname -a
Linux 11 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

二、查看Linux系统版本的命令(2种方法):
1、lsb_release -a,即可列出所有版本信息:

[root@11 ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.4.1708 (Core) 
Release:    7.4.1708
Codename:   Core

这个命令适用于所有的Linux发行版,包括RedHatSUSE、Debian…等发行版。

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

 [root@11 ~]# cat /etc/redhat-release
 CentOS Linux release 7.4.1708 (Core)
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容