如何解決 CentOS 7 lsb_release 無法使用問題
阿新 • • 發佈:2019-03-30
[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 ~]#