yum查询软件:使用yum命令查询软件包信息
4.1 问题
本例要求学会使用yum命令查询软件包信息,完成下列任务:
1)列出软件包名称、版本信息
列出所有已安装的软件、所有未安装但软件源能提供的软件包
检查软件 httpd、firefox、rar 是否已经安装
2)查询软件包描述信息
了解软件包 kernel、bash、wireshark 的用途
3)查询哪些软件包能提供指定的程序/文件
查询命令程序 vim 由哪个软件包提供
查询文件 /etc/redhat-release 由哪个软件包提供
4.2 步骤
实现此案例需要按照如下步骤进行。
步骤一:列出软件包名称、版本信息
1)列出所有已安装的软件
[root@svr7 ~]# yum list installed
.. ..
已安装的软件包
GConf2.x86_64 3.2.6-8.el7 @anaconda
GeoIP.x86_64 1.5.0-14.el7 @anaconda
ModemManager.x86_64 1.6.10-3.el7_6 @anaconda
ModemManager-glib.x86_64 1.6.10-3.el7_6 @anaconda
NetworkManager.x86_64 1:1.18.0-5.el7 @anaconda
NetworkManager-adsl.x86_64 1:1.18.0-5.el7 @anaconda
NetworkManager-glib.x86_64 1:1.18.0-5.el7 @anaconda
NetworkManager-libnm.x86_64 1:1.18.0-5.el7 @anaconda
.. ..
yum.noarch 3.4.3-163.el7.centos @anaconda
yum-langpacks.noarch 0.4.2-7.el7 @anaconda
yum-metadata-parser.x86_64 1.1.4-10.el7 @anaconda
yum-plugin-fastestmirror.noarch 1.1.31-52.el7 @anaconda
yum-utils.noarch 1.1.31-52.el7 @anaconda
zenity.x86_64 3.28.1-1.el7 @anaconda
zip.x86_64 3.0-11.el7 @anaconda
zlib.x86_64 1.2.7-18.el7 @anaconda
[root@svr7 ~]#
3)检查软件 httpd、firefox、rar 是否已经安装
[root@svr7 ~]# yum list httpd
.. ..
可安装的软件包 //未安装但可安装的软件
httpd.x86_64 2.4.6-90.el7.centos repo_cos7dvd
[root@svr7 ~]# yum list firefox
.. ..
已安装的软件包 //已安装的软件
firefox.x86_64 60.8.0-1.el7.centos @anaconda
[root@svr7 ~]# yum list rar
.. ..
错误:没有匹配的软件包可以列出 //未安装且没有源提供的软件
步骤二:查询软件包描述信息
1)了解软件包 kernel 的用途
软件包kernel主要提供Linux的运行内核程序:
[root@svr7 ~]# yum info kernel
.. ..
已安装的软件包
名称 :kernel
架构 :x86_64
版本 :3.10.0
发布 :1062.el7
大小 :64 M
源 :installed
来自源:anaconda
简介 : The Linux kernel
网址 :http://www.kernel.org/
协议 : GPLv2
描述 : The kernel package contains the Linux kernel (vmlinuz), the core of: any Linux operating system. The kernel handles the basic functions: of the operating system: memory allocation, process allocation,: device input and output, etc.
2)了解软件包 bash 的用途
软件包bash主要为Linux系统提供命令行解释器程序(/bin/bash):
[root@svr7 ~]# yum info bash
.. ..
已安装的软件包
名称 :bash
架构 :x86_64
版本 :4.2.46
发布 :33.el7
大小 :3.5 M
源 :installed
来自源:anaconda
简介 : The GNU Bourne Again shell
网址 :http://www.gnu.org/software/bash
协议 : GPLv3+
描述 : The GNU Bourne Again shell (Bash) is a shell or command language: interpreter that is compatible with the Bourne shell (sh). Bash: incorporates useful features from the Korn shell (ksh) and the C: shell (csh). Most sh scripts can be run by bash without: modification.
步骤三:查询哪些软件包能提供指定的程序/文件
1)查询命令程序 vim 由哪个软件包提供
可以获知对应的软件包名称是 vim-enhanced:
[root@svr7 ~]# yum provides "*bin/vim"
.. ..
2:vim-enhanced-7.4.629-6.el7.x86_64 : A version of the VIM editor which: includes recent enhancements
源 :repo_cos7dvd
匹配来源:
文件名 :/usr/bin/vim
2:vim-enhanced-7.4.629-6.el7.x86_64 : A version of the VIM editor which: includes recent enhancements
源 :@anaconda
匹配来源:
文件名 :/usr/bin/vim
[root@svr7 ~]#
2)查询命令程序 ifconfig 由哪个软件包提供
可以获知对应的软件包名称是 net-tools:
[root@svr7 ~]# yum provides /etc/redhat-release
.. ..
net-tools-2.0-0.25.20131004git.el7.x86_64 : Basic networking tools
源 :repo_cos7dvd
匹配来源:
文件名 :/sbin/ifconfig
net-tools-2.0-0.25.20131004git.el7.x86_64 : Basic networking tools
源 :@anaconda
匹配来源:
文件名 :/sbin/ifconfig
[root@svr7 ~]#
yum查询软件:使用yum命令查询软件包信息相关推荐
- 快递查询软件,怎么批量查询、复制不重复的发货信息
最近有很多朋友在问,如何批量查询物流信息,并批量复制不重复的发货信息呢?今天小编给大家分享一个新的查询技巧,它支持多家快递,一次能查询多个单号物流,还可对物流进行分析.筛选以及导出,下面一起来试试. ...
- linux中查yum命令,yum 查看软件
在linux下如何使用yum查看安装了哪些软件包 Linux系统下yum命令查看安装了哪些软件包:$yum list installed //列出所有已安装的软件包yum针对软件包操作常用命令:1.使 ...
- 【十三单元】 软件安装 yum源配置
***************** ****软件安装****** ***************** ****1.软件名称识别**** [abrt-addon-ccpp]-[2.1.11-19].[e ...
- Linux查询网络配置相关命令
Linux查询网络配置相关命令 查看网络接口信息 ifconfig:查看系统所有网络接口相关信息 ifconfig -s:查看所占内存 查看及修改主机名 hostname:查看主机名称 hostnam ...
- RHEL7.2系统下的软件管理(yum)、本地yum源和网络yum源的搭建
在Liunx系统中,rpm和yum都可以安装软件,但rpm存在安装软件的依赖性,yum安装软件需要yum源 1.yum yum install softwarename ##安装 yum repoli ...
- 淘宝信誉查询软件 官网免费版
淘宝信誉查询软件 官网免费版 软件大小:626KB 软件语言:简体中文 软件类别:应用其他 软件授权:官方版 应用平台:/Win8/Win7/WinXP 是一款免费的淘宝卖家信誉查询工具.淘宝信誉查询 ...
- 身份证归属地查询软件(离线版)
这是一款使用C#语言写的软件,可以实现身份证归属地离线查询功能,目前源代码已经开源至码云,github平台,效果如下: 当输入前两位数字时,可查询到相关省:当输入前四位数字时,可查询到相关市:当输入前 ...
- 达梦数据库 查询当前用户连接数命令
达梦数据库 查询当前用户连接数命令 查询当前用户连接数 select count(*) from v$sessions where state='ACTIVE'; 查询最大连接数 select SF_ ...
- RedHat系列软件管理(第二版) --二进制软件包管理
RedHat系列软件管理 --二进制软件包管理 Linux学习思想-Linux相对与Windows来非常透明,因此,无论是系统,还是软件,都会有本身自带,或者是Man给提供的非常详细的说明/帮助文档, ...
最新文章
- rsync - 远程同步工具
- MySQL-过滤数据
- 计算机存储器可分两类,计算机存储器可分为几类?它们的主要区别是什么?
- KYOCERA Programming Contest 2021(AtCoder Beginner Contest 200)题解
- codeigniter view 试图里再引入view视图
- The seventeenth day
- Atitit bootsAtitit bootstrap布局 栅格.docx 目录 1. 简述container与container-fluid的区别	1 1.1.1. 在bootstrap中的布局
- gitlab mr wip 怎么弄成_Gitlab基本管理(二)
- Python教学视频(一)Python基础环境的安装
- C4认证Java基础Excel练习题
- hadoop服务器中断,Hadoop服务器上的虚拟内存错误
- 给有从事软件研发想法的在校大学生的一丝建议
- 笔记本添加外置显示器
- Python使用try...except...输出详细错误信息(比如报错具体位置在第几行)
- latex 矩阵分块(block matrix)
- HTML筑基知识点四
- 2022年度湖北省科技创新人才及服务专项软科学研究项目申报条件、流程和项目类别
- unity3d websocket
- 关于引流脚本,你了解的引流脚本的优势有哪些?
- [大学物理实验-1]弹簧谐振子实验