Linux is complicated for different reasons. But even when you think you know Linux, switching from a distribution to another can also bring many changes, like the one concerning the package manager.
DEB and RPM are two files used by package managers on Linux operating systems. The main difference is that DEB can only be used on Debian-based distributions, while RPM are for distributions based on Red Hat.
In this article, we’ll discuss in detail about DEB and RPM to see the exact differences between them.
deb is the format, as well as extension of the software package format for the GNU/Linux distribution Debian and its derivatives.Wikipedia
In short, to install a new application on Debian, you’ll need a deb file, one way or another. If you use a graphical tool or the apt command it might be hidden, but in the background, that’s always a deb file that will be downloaded and installed.
A deb file is an archive containing all the files needed to install the desired software.
You should also read: Differences Between The Operating System (OS) and The Kernel
Which Linux distributions use DEB packages?
As explain in this article, Linux is the kernel of many different systems, named distributions. Debian is one popular distribution, but it’s not the only one.
Debian and all distributions based on it are using DEB packages to install new software. It includes well-known distributions like Ubuntu, Linux Mint or Kali Linux but also many others.
How to install DEB packages?
As I already told you, DEB packages are most of the time installed in the background via tools like apt or a graphical equivalent. But it’s also possible to download an install them manually.
For example, if you download the Opera web browser on the official website, you’ll get a deb file named something like:
Once downloaded you can install it with this command:
sudo dpkg -i opera-stable_77.0.4054.64_amd64.deb
The -i option stands for “install”.
A package file might have some dependencies to work correctly, in this case you need to install them first.
What is RPM on Linux?
RPM stands for Red Hat Package Manager. It’s a file format that can be use by the package manager on Red Hat systems to install a new software on a computer. Basically, it’s an archive file containing everything needed to install the corresponding application.
Which Linux distributions use RPM packages?
All distributions based on Red Hat use RPM packages to install new applications. For example, Fedora, CentOS and OpenSuse can read and install RPM packages natively.
How to install RPM packages?
Red Hat-based systems comes with the RPM package manager tool, that can be used to install new RPM packages.
The corresponding command line is:
rpm -ivh <package_name>
- i: Install a new package
- v: Print verbose information
- h: Better display for the verbose information
Differences between DEB and RPM
From a user point of view, there is no big difference between DEB and RPM. In both cases, they are the files needed to install a new application on their system.
Even if DEB and RPM are not different for the end user, they don’t work on the same operating systems.
Linux distributions based on Debian can install DEB files while distributions based on Red HAT can only install RPM packages.
Convert RPM to DEB
As there is no big technical difference between RPM and DEB, it’s possible to convert one format to another by using the alien command line.
So, the first step is to install alien:
sudo apt install alien
The, you can use the alien command to convert an rpm file to a deb package:
Convert DEB to RPM
The “alien” tool can be used the same way to convert a deb file to a rpm package:
alien -r <package-name>.deb
Once done, you can use the commands given previously to install them on your system.
Does Ubuntu use DEB or RPM?
Ubuntu is based on Debian, so it uses DEB packages to install new applications. Ubuntu also relies on SNAP, which is another package system (bundling apps and their dependencies in one file).
Does CentOS use DEB or RPM?
CentOS is based on Red Hat, so as any Red Hat distributions, applications are installed by using RPM files.
Is Fedora RPM or DEB based?
Fedora is based on Red Hat, and uses RPM files to install new applications.
Does Linux Mint use DEB or RPM?
Linux Mint is another Linux distribution, based on Ubuntu, and so it uses the same package system as on any Debian-based distribution: DEB files.
What’s the difference between DPKG and RPM?
Dpkg is a Linux command that can be used to install DEB files on Debian-based distributions. It’s the equivalent of the rpm command on distributions based on Red Hat.