很多时候,我们查看系统是否已安装了某个软件包
我们都用rpm -qa|grep xx
其实我们可以使用yum命令
yum list|grep xx
其实还有更直接的方法,直接输入文件名
yum provides xx
# yum provides vim
已加载插件:fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
2:vim-enhanced-7.4.629-5.el6.x86_64 : A version of the VIM editor which includes recent enhancements
Repo : base
匹配来自于:
Other : vim
2:vim-enhanced-7.4.629-5.el6.x86_64 : A version of the VIM editor which includes recent enhancements
Repo : installed
匹配来自于:
Other : 提供依赖满足:vim
所以在铭哥讲课的时候一定要学以致用,不能太死板
我们都用rpm -qa|grep xx
其实我们可以使用yum命令
yum list|grep xx
其实还有更直接的方法,直接输入文件名
yum provides xx
# yum provides vim
已加载插件:fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
2:vim-enhanced-7.4.629-5.el6.x86_64 : A version of the VIM editor which includes recent enhancements
Repo : base
匹配来自于:
Other : vim
2:vim-enhanced-7.4.629-5.el6.x86_64 : A version of the VIM editor which includes recent enhancements
Repo : installed
匹配来自于:
Other : 提供依赖满足:vim
所以在铭哥讲课的时候一定要学以致用,不能太死板
编辑回复