Centos

yum/dnf/rpm 等價於 RHEL/CentOS 的 dpkg -l

  • January 14, 2021

是否有與 Debian/Ubuntu 的命令等效yumdnf, 或命令來列出軟體包名稱安裝狀態?rpm``dpkg -l

yum list packagename

這將返回已安裝軟體包的列表,然後是可用/未安裝的列表

例如

[root@RHELPOC ~]# yum list systemd
Updating Subscription Management repositories.
Last metadata expiration check: 1:42:23 ago on Fri 08 Jan 2021 16:47:42 GMT.
Installed Packages
systemd.x86_64              239-41.el8_3                @rhel-8-for-x86_64-baseos-rpms
Available Packages
systemd.i686                239-41.el8_3.1              rhel-8-for-x86_64-baseos-rpms
systemd.x86_64              239-41.el8_3.1              rhel-8-for-x86_64-baseos-rpms

dpkg -l相當於rpm -qa

引用自:https://serverfault.com/questions/1048087