Skip to main content

There was a time when you typed sudo apt-get install [package] (or yum, pacman, dnf, etc.) in your terminal, then, a list of dependencies of that package was shown, and you were prompted if the installation should proceed. But now, and an innovative revolution has risen: cross-distribution applications. This time, I will make a comparison of three major formats: AppImage, Flatpak, and Snaps.

But now, and an innovative revolution has risen: cross-distribution applications. This time, I will make a comparison of three major formats: AppImage, Flatpak, and Snaps.

AppImage.

In the first place, AppImage is not a package manager or an application store by any means. AppImage is just a packaging format that lets anybody using a Linux distribution to run it without the need to install it (by “installing” I mean the traditional way packages are installed in GNU/Linux). The user doesn’t even need to have administrator permissions in order to do it. Just give the file execution permissions, and you are done. In essence, they are self-mounting disk image files that run the application they contain. They were thought with immutable filesystems in mind as well.

The main advantages of this format are:

  • It eases the process of distributing applications on Linux.
  • They are super easy to install (it actually doesn’t get installed in the conventional sense).
  • Many application vendors have adopted AppImage as their default format.
  • Runs on most distributions (this is too sweet for an application packager).
  • Optionally, the applications can run in a sandbox.

Flatpak.

Flatpak (also known as xdg-app) was designed with the concept of runtimes from its very beginning. For example, there could be the GNOME runtime (which will be, in short, the GNOME desktop environment), and applications packaged with that runtime as the target can run on top of it. The runtimes provide some nice features like isolation between applications and controlled resource access to hardware devices. Flatpak is used by default in Endless OS to manage application installations and performing system updates/upgrades.
It’s important to note that Flatpak requires the application being executed via the flatpak [application] command.

It’s main features are:

  • Isolation between applications.
  • Control over the resources the application has access to.
  • Tightly coupled environments called runtimes, which reduces the bandwidth consumption during installations/upgrades for applications that belong to a currently installed runtime.

Snappy.

Snaps were developed with the application stores and interfaces in mind. Snaps are self-contained, read-only applications that can be run on many Linux distributions via snapd. The snap format is a compressed filesystem that is mounted before executing the application contained within it (very similar to what an AppImage does). The snap is then executed in an isolated environment (like Flatpak applications) and has limited resource access, defined by the user. Each app can connect to another only by the use of well-defined interfaces. Some applications packaged as snaps can be found on the Snapcraft store.

Notable features of this format are:

  • Read-only and signed content, which means the application can’t be adulterated.
  • Self-contained, which decouples the application from the underlying system.
  • Applications can communicate with each other only through interfaces (plugs and slots).

Last word.

These three technologies are being adopted in some distributions. We have Ubuntu, for example, which is using snapd by default since version 16.04. Flatpak is mostly used in Fedora (since version 23) and the GNOME desktop environment. Both snaps and flatpaks have ports that run at least on Gentoo, Arch Linux, Mageia, Open SUSE Tumbleweed, and Debian Jessie. AppImages, on the other hand, are being supported and used by default in Nitrux OS, by Nitrux. There’s a software center (AppImages don’t require this, but to provide a better UX, the developers decided to build the software center) from which the user can install applications packaged as AppImages.

So, which one is the “best”? Well, it will depend on what do you want to achieve. AppImages are the best choice for end-user content distribution and desktop-oriented computing. Flatpak will shine when you use only one desktop environment, whereas Snappy is the best choice for IoT devices on which the vendor must ensure that the device will work without or with small user interaction; and snaps implement automatic updates.