yum 常用命令

yum 常用命令

查看yum安装源

[root@localhost ~]# yum repolist all
Loaded plugins: fastestmirror, priorities
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.cqu.edu.cn
 * updates: mirrors.aliyun.com
repo id                       repo name                                                    status
C7.0.1406-base/x86_64         CentOS-7.0.1406 - Base                                       disabled
C7.0.1406-centosplus/x86_64   CentOS-7.0.1406 - CentOSPlus                                 disabled
C7.0.1406-extras/x86_64       CentOS-7.0.1406 - Extras                                     disabled

安装软件

yum install packagename #安装指定包
yun groupinstall groupname #安装程序组

更新和升级

yum update packagename #更新指定包
yum check-update #检查可更新的安装包
yum upgrade packagename #升级指定包
yum groupupdate groupname #升级指定程序组

查找和显示包信息

yum info packagename #显示安装包信息
yum list #显示已安装包和可安装包
yum list  packagename #显示指定包安装情况
yum list groupinfo groupname #显示程序组groupname
yum search string #根据关键词查找包

删除

yum remove/erase packagename #卸载程序包
yum groupremove groupname #卸载程序组
yum deplist packagename #查看包package的依赖情况

清理本地缓存

yum clean all 

#清楚插件缓存
yum clean plugins

构建缓存

yum makecache

转载于:https://www.cnblogs.com/dowhile/p/yum.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值