Home >System Tutorial >LINUX >RPM vs DEB: Comparative analysis of two software package formats in Linux systems

RPM vs DEB: Comparative analysis of two software package formats in Linux systems

PHPz
PHPzforward
2024-02-13 14:00:04983browse

There are two common software package formats in Linux systems: RPM and DEB. They are the standard formats of the Red Hat series and Debian series respectively, and are used to manage the installation, upgrade, uninstallation and other operations of software. But, do you know what the difference is between them? This article will compare RPM and DEB from four aspects to help you better understand and use these two software packages.

How to list the files of all installed software packages in Linux

You can use the repoquery command, which is part of yum-utils, to list the files installed by a given package on CentOS/RHEL systems.
To install and use yum-utils, run the following command:

# yum update
# yum install yum-utils

Now you can list the files of an installed package, such as httpd server (note that package names are case-sensitive). –installed indicates installed packages, -l lists all files:

# repoquery --installed -l httpd
# dnf repoquery --installed -l httpd  [On Fedora 22+ versions]
RPM vs DEB:Linux系统中两种软件包格式的对比分析

repoquery List files installed by httpd

Important: In Fedora 22 and above, the repoquery command has been integrated with the dnf package manager in RPM-based distributions, and you can use the above method to list installed files.
In addition, you can also use the following rpm command to list the files in the .rpm package or the installed .rpm package. The following -q and -l indicate to list the files in the following package:

# rpm -ql httpd
RPM vs DEB:Linux系统中两种软件包格式的对比分析

rpm Query the installation package of the installed program

Another useful tip is to use -p to list the files in the .rpm before installing.

# rpm -qlp telnet-server-1.2-137.1.i586.rpm

In Debian/Ubuntu distributions, you can use the dpkg command with the -L flag to list the installed files for a given .deb package on a Debian system or its derivatives.
In this example, we will list the files installed by the apache2 web server:

$ dpkg -L apache2
RPM vs DEB:Linux系统中两种软件包格式的对比分析

dpkg List installed packages

Don’t forget to check out other articles about package management in Linux.

The above is the detailed content of RPM vs DEB: Comparative analysis of two software package formats in Linux systems. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:lxlinux.net. If there is any infringement, please contact admin@php.cn delete