如何解决 CentOS 7 lsb_release 没法使用问题

[root@promote ~]# lsb_release -a

bash: lsb_release: command not found...

打开CentOS7,想要使用 lsb_release 查看系统版本信息。bash

解决方法以下:code

#系统自带方法产看系统版本
[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

从新执行命令。ip

[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 ~]#
相关文章
相关标签/搜索