yum provides反查询安装lsb_release示例

本文详细介绍了Linux Standard Base (LSB)的概念及lsb_release命令的使用方法,包括显示版本信息、发行版ID、描述信息、具体版本号、代号以及所有信息的命令选项。同时,通过具体的反查询示例,展示了如何使用yum命令查找lsb_release的源文件,以及如何安装和验证LSB基库支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值