1. 程式人生 > >如何查看Linux發行版本

如何查看Linux發行版本

desc 找到 lan ash 命令 clas lin ins tools

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) 

  

如何查看Linux發行版本