What are .deb and .rpm and how are they different from .msi?

Files such as .deb and .rpm are more akin to a .zip file. They're a directory tree of files and sub-directories that contain files related to a particular application and/or library of files.

Distros

The .deb files are meant for distributions of Linux that derive from Debian (Ubuntu, Linux Mint, etc.). The .rpm files are used primarily by distributions that derive from Redhat based distros (Fedora, CentOS, RHEL) as well as by the openSuSE distro.

What's special about them?

These files have one other special trait that sets them apart from .zip files, in that they can include a specification that contains rules that tell the package manager software running on a system that's installing one of these files to do additional tasks. These tasks would include things such as:

  • creating user accounts on the system
  • creating/modifying configuration files that aren't actually contained in the .deb or .rpm file
  • set ownership/permissions on the files after installation
  • run commands as root on the system that's installing the package
  • dependencies, both formats can include names or packages and/or service names that they require to be present on a system, prior to installation.

What about .msi files?

.msi files are similar to .deb & .rpm files but likely even more sophisticated. The .msi files are utilized by the Windows Installer and offer additional features such as:

  • GUI Framework
  • generation of uninstall sequences
  • A framework within itself - for use by 3rd party installers
  • Rollbacks
  • Advertisement
  • User Interface
  • etc.

I'd suggest taking a look at the various Wikipedia pages on these subjects if you want a more in-depth explanation.

References

  • Windows Installer - .msi
  • RPM file format
  • DEB file format

The other answers touch upon qualities of .deb and .rpm that are similar to .msi. They all contain software in a compressed format that can do some extra things. Those extra things already mentioned included adding users, pre- and post-install tasks, registering the program with the system (e.g. windows registry, xdg-dirs, OpenRC/systemd init, etc).

What differentiates the formats (and is a huge pro) is dependencies. Both .deb and .rpm files can and do list names and versions of other programs that must be installed as pre-requisite software. By themselves, this is just informational, but...

You typically do not directly interact with .deb and .rpm files the way you do with .msi files. In fact, as alluded to earlier, a .deb is typically just an archive (ar or tar) compressed with xz with the contained files in a specific directory layout. Instead you use tools like dpkg and rpm to manipulate these files.

dpkg and rpm will install the contents of .deb and .rpm files and verify all pre-requisite software is installed. Running these programs is similar to clicking on a .msi file. Users however, do not typically interact with dpkg or rpm but instead use apt-get and yum to install packages. These tools do not have exact analogs on windows.

Both apt-get and yum are able to fetch files from remote (or local) repositories and use the dependency information stored in the .deb and .rpm files to fetch and install any pre-requisites not met. With these tools I do not need to know or worry about what other software I need, I can just specify apt-get install chromium and know that apt-get will make sure I have gtk+, alsa, certain X libraries, etc installed without me having to manually find and install those .deb and .rpm files.

apt-get and yum are the big two package managers, you'll also find emerge and pacman out there, which do the same jobs although with different underlying mechanisms.


It has quite the same functionalities as an MSI file under Windows :

  • it registers the software in a registry,
  • it registers which files have been installed with that package.

Under Linux, they also manage dependencies between other packages.

This package managment formats do many other things, but this is the main functionalities.