LSB是Linux Standard Base的缩写, lsb_release命令用来显示LSB和特定版本的相关信息。如果使用该命令时不带参数,则默认加上-v参数。
-v 显示版本信息。
-i 显示发行版的id。
-d 显示该发行版的描述信息。
-r 显示当前系统是发行版的具体版本号。
-c 发行版代号。
-a 显示上面的所有信息。
-h 显示帮助信息。
反查询lsb_release源
[root@vm-10-122-64-91 ~]# yum provides lsb_release
Loaded plugins: fastestmirror, security
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Warning: 3.0.x versions of yum would erroneously match against filenames.
You can use "*/lsb_release" and/or "*bin/lsb_release" to get that behaviour
No Matches found
提示用: yum provides */lsb_release,执行此命令
[root@vm-10-122-64-91 ~]# yum provides */lsb_release
Loaded plugins: fastestmirror, security
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
redhat-lsb-core-4.0-7.el6.centos.i686 : LSB base libraries support for CentOS
Repo : base
Matched from:
Filename : /usr/bin/lsb_release
redhat-lsb-core-4.0-7.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo : base
Matched from:
Filename : /usr/bin/lsb_release
dkms-2.3-1.20161202gitde1dca9.el6.noarch : Dynamic Kernel Module Support Framework
Repo : epel
Matched from:
Filename : /usr/lib/dkms/lsb_release
dkms-2.4.0-1.20170926git959bd74.el6.noarch : Dynamic Kernel Module Support Framework
Repo : epel
Matched from:
Filename : /usr/lib/dkms/lsb_release
dkms-2.3-4.20170313git974d838.el6.noarch : Dynamic Kernel Module Support Framework
Repo : epel
Matched from:
Filename : /usr/lib/dkms/lsb_release
redhat-lsb-core-4.0-7.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo : installed
Matched from:
Filename : /usr/bin/lsb_release
安装
yum install redhat-lsb-core-4.0-7.el6.centos.x86_64
验证
lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.6 (Final)
Release: 6.6
Codename: Final