On a Linux distro, you should always install new software with the aid of your package manager when possible. It keeps things clean, and all files are tracked by the manager and can be easily removed later. This also helps avoid potential trouble when you later upgrade your distribution. But since your distribution might not have the software you need, or some might be too old, you sometimes have to resort to alternatives. Out of all these alternatives, though, only choose to download third party “.deb” or “.rpm” files as a last resort.
What Is AppImage?
On Windows, you can download a ZIP archive, extract the contents to a directory, and run the application within, without having to install it. This is called a portable app because you can copy it to a USB stick and then run it on any computer that uses the Windows operating system.
An AppImage, though technically constructed in a different way, works the same from the user’s perspective. You download one file and run the program on your Linux operating system without having to install anything. Furthermore, you can also copy this on a USB stick, and it will run on Debian, Ubuntu, Arch Linux, openSUSE, Fedora, or any other Linux distribution.
How Does AppImage Work?
A program usually needs to use some libraries to do some work. A distribution chooses specific versions of libraries and makes sure all programs it includes will work with these. A random version of a random program from the Internet might need libraries not included in your distribution.
Instead of relying on what your operating system provides, an AppImage packs everything the application needs inside a single file. When you run this file, it does its magic and creates a temporary filesystem, where it has access to everything that it needs. In the following picture, you can see file contents of a LibreOffice AppImage temporary filesystem.
You can notice here how it includes the necessary libraries, files whose names start with “lib” and end with the “.so” extension.
AppImage vs. Snap and Flatpak
Flatpak/snap apps may feel similar to AppImage apps, but they’re pretty different. For starters, flatpaks and snaps need an environment and daemon to be installed beforehand. The daemon supervises and manages how applications run, update, install, and so on. There are of course pros and cons to each solution, and there’s not one that is “best.” It all depends on what you need from your software.
Here are some advantages of snaps/flatpaks:
- They are sandboxed, isolated from the rest of your system. This provides protection against most types of malware and keeps everything contained.
- You can download snaps from a central store. You can also search for software, download and install directly from the command line.
- It’s easy to upgrade packages. The daemon looks at the store to find if a newer version is available and does the job for you.
Advantages of AppImage:
- You don’t have to prepare your system before you run an AppImage. It might seem like this is not a huge problem, you only install the snap daemon once, then it just works. But think about this scenario. You are at school and need to quickly run a program. You can’t install the snap daemon (no root privileges), so you can’t run your favorite snap. However, you can download an AppImage and run it, even without administrator privileges.
- Truly portable: you can carry an AppImage on a USB stick and run it on any Linux OS.
- Some AppImage programs can update themselves.
- Everything is contained in just one file. Doesn’t get any simpler than that: download file to “install,” delete it to “uninstall.”
How to Run AppImage
After you download such a file, it will not be immediately executable. In some cases, it might have an executable icon showing up. In other cases, something might even happen when you double-click on it. For example, the operating system might confuse it for a video file and try to open it with your video player.
However, after the download is finalized, you need to right-click on the file, go to Properties, then Permissions, and enable the executable bit on it. How you do this depends on your desktop environment.
There’s either an option to allow the file to run as a program/executable or an option to allow the “Execute” permission for “Anyone.”
You can find a list of AppImage programs if you want to test one out. There’s no official central store, though, and most of the time you will find an AppImage listed as a download option on a program’s download web page.
If you’re wondering whether you should use AppImage, Snap or Flatpak, the answer is simple. If you rarely use apps outside of what your package manager provides, use AppImage when possible. However, if you often need third-party software and only use it on your local computer, use Snap or Flatpak. If you need to take your apps with you and run them on other computers, use AppImage when it’s available.
Image Credit: AppImage logo from appimage.org
Our latest tutorials delivered straight to your inbox