装lsb_release
使用yum安装lsb,具体命令如下:
[root@localhost Desktop]# yum install -y redhat-lsb
然后进如自动安装阶段,直到安装命令自动运行完毕。如下图所示:
3.验证lsb是否已经安装
执行命令,发现可以查看系统版本。
[root@localhost Desktop]# 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