如何解決 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 ~]#
相關文章
相關標籤/搜索