[root@promote ~]# lsb_release -a
bash: lsb_release: command not found...
打开CentOS7,想要使用 lsb_release 查看系统版本信息。
解决方法如下:
#系统自带方法产看系统版本
[root@promote ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
#安装redhat-lsb,等价于redhat-lsb-core
[root@promote ~]# yum install -y redhat-lsb
重新执行命令。
[root@promote ~]# 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.6.1810 (Core)
Release: 7.6.1810
Codename: Core
[root@promote ~]#