查看CentOS 发行版的名称及其版本号

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://zhangboyi.blog.csdn.net/article/details/100011389

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

1、cat /proc/version

[root@bj-rack001-hadoop001 ~]# cat /proc/version
Linux version 3.10.0-862.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Fri Apr 20 16:44:24 UTC 2018

2、uname -a

[root@bj-rack001-hadoop001 ~]# uname -a
Linux bj-rack001-hadoop001 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

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


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

[root@bj-rack001-hadoop001 ~]# lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.5.1804 (Core) 
Release:	7.5.1804
Codename:	Core

 

 

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

[root@bj-rack001-hadoop001 ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core) 

 

展开阅读全文

没有更多推荐了,返回首页