如何查看Linux发行版本

1、lsb_release -a

[root@node1484 tools]# 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.2.1511 (Core) 
Release:    7.2.1511
Codename:    Core

使用该命令是如果提示:

[root@node1483 ~]# lsb_release -a
-bash: lsb_release: 未找到命令

使用命令安装:yum install -y redhat-lsb

2、cat /etc/redhat-release

适用于RedHat、CentOS

[root@node1484 tools]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core) 

  

posted @ 2019-02-17 13:53  归去来兮码乘虚  阅读(200)  评论(0编辑  收藏  举报