在linux系统中,yum(yellowdog updater modified)是一个用于管理软件包的命令行工具,能够自动处理软件的安装、升级、查询和卸载等任务。要查找已安装软件的版本信息,可以使用yum提供的yum info命令。以下是使用yum info命令查找软件版本的具体步骤:
例如,对于lsof软件包,执行yum info lsof命令后,输出可能如下:
<code>Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager Loading mirror speeds from cached hostfile * base: mirror.speedpartner.de * updates: mirror.speedpartner.de * extras: centos_mirror.btte.net * updates-updates: centos_mirror.btte.net <p>Available Packages Name : lsof Arch : x86_64 Version : 4.87 Release : 6.el7.x86_64 Size : 927 k Repo : installedFrom Summary : A utility which lists open files on a Linux/UNIX system URL : <a href="https://www.php.cn/link/1b8058dee2800a7e966dcb494a5f1fed">https://www.php.cn/link/1b8058dee2800a7e966dcb494a5f1fed</a> License : ASL 2.0 Description : Lsof stands for List Open Files, and it does just that: : it lists information about files that are open by the processes : running on a UNIX system.</code>
在输出信息中,Version一行显示了lsof软件包的版本号为4.87。
此外,如果你想查看所有已安装软件包的版本信息,可以使用yum list命令结合grep命令进行过滤:
<code>yum list installed | grep <package_name></code>
例如,查找所有已安装的lsof相关软件包及其版本:
<code>yum list installed | grep lsof</code>
这将列出所有与lsof相关的已安装软件包及其版本信息。
通过上述方法,你可以轻松地使用Yum命令查找Linux系统中已安装软件的版本信息。

以上就是Yum如何查找软件版本的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号