If you are using Linux then one thing you probably notice that every Linux distro has its own package managing system. In Debian base distros like Ubuntu, Debian, Kubuntu, Elementary etc has APT package manager and RPM base distro has RPM/YUM/DNF package manager by default. These package managers have their own set of commands and managing system in Linux. This is the drawback when you switch from one Linux distro to another , you have to learn all new package managing commands and their configuration etc. This drawback force Linux community developers to create a universal package manager which can work for all Linux distros. So this is how Universal Package Manager come into the picture. Today again we have many Universal Package Manager which gain popularity over the traditional package manager.
Below are some pro and cons using these package managers
Pros :
1) Universal and Cross Platform : These package managing system have same configuration for any Linux distros. You can install these package managing system in any popular Linux distro with native package managing command.2) Direct Package Access : A software developers can directly push their package to these package manager store or repository( e.g snapstore, flatpack store) which is not possible in traditional package managing system due to package distribution management system. So this make a direct access of that application to user with any delay by package distribution maintainers.
3) Secure : These package managers uses a sandbox technology ( some of them) so they are limited to communicate with the host operating system. Only limited access will be granted if required.
Cons :
1) Trust Issue : As any developer can upload their application in these platform so It is suggested by these package managers that you only have to use any package only if you trust the software original provider. This is because in 2018 some suspicious apps are found which are running in background mining activity as a service. how ever the issue was reported and resolved.
2) Stability : Sometimes packages which are running in these sandboxes are not performing well as the system default packages applications. there may be some reasons like they are not allowed to access the some hardware resource as they required or due to Linux OS are not properly supporting them to run smoothly.
3) Maintenance Issue : Repository / Package version maintenance could be an issue because there is intermediate person between the package provider and the users. Developers can directly push their packages to central repository so all he is responsible for maintaining that software and provide the latest updated version to its users.
Now lets take a look at some most popular universal package managers in Linux. These are Snap, FlatPak, AppImages. Lets explore these things.
What are Snap , Flatpak And AppImage Packages ?
Snap Package Manager : The most popular & trusted universal package manager till date. As it is developed by Canonical, who are the developers of Ubuntu system. It is now preinstalled in Linux distros including Ubuntu, Manjaro, Zorin etc and it is also available for most popular Linux distros in the market. Snaps are self contained applications running in a sandbox with mediated access to the host system. Snaps are app packages for desktop, cloud and IoT that are easy to install, secure, cross-platform and dependency-free. The snap file format is a single compressed filesystem using the SquashFS format with the extension .snap
Installation
First you have to install the snapd utility to manage the snap packages.
For Ubuntu/Debian command is as below.
sudo apt update && sudo apt install snapd
To install a single package using snapd.
snap install PackageName
To remove/ uninstall a package using snap.
snap remove PackageName
Let understand the terminology in snap package system.
Snaps : The software packages are called Snaps.
Snapd : These snaps are manage by Snapd which is an daemon service that runs in the background.
SnapStore : These snaps are maintained on a central repository called SnapStore .
Snapcraft : A tool which is used to create snap packages is called Snapcraft.
Flatpak Package Manager : Another universal package manager developed by Alex Larsson as a part of opendesktop.org. It provides desktop application unlike snaps who provides application for IoT as well cloud applications. They also use the sandboxing technique to install the flatpak packages in Linux system. Flatpak is explicitly available for Linux based system because they use many features of Linux kernel like (bind mounts, namespaces, seccomp, etc) in their package system to run any app smoothly. Flatpack application comes with .flatpak file extension.
Flatpak packages can be installed in any Linux distribution using flatpak utility. Once you install the flatpak utility you are ready to install any flatpak packages in your Linux system. All packages are found in their central repository called FlatHub just like Google Play Store in Android. But it is not necessary to have in your system. all you need a flatpak utility
Flatpak identifies each application and runtime using a unique three-part identifier, such as com.company.app . Flatpak provide an reference file which can be used to install an app , this is just like an installer in Windows system.
Installation :
First you have to install Flatpak utility so that your system support flatpak and you can install Flatpak apps. run below command in deb base distros :
sudo apt update && sudo apt install flatpak
For more info on this , visit the official page
Install a package using flatpak , run below command from terminal
flatpak install PackageName
This is the simplest approach in order to install a pacakge if it is available in remote repository ( FlatHub). If there are multiple packages available then your will be prompted to select which one you want to install. Thats it.
Another installation approach is, visit the flathub repository > search for your package > download the reference file > execute installation command by giving the reference file full name . For example if you want to install firefox with this approach command will be :
flatpak install org.mozilla.firefox.flatpakref
Remove a packge from system using Flatpak
flatpak remove PacakgeName
Terminology in Flatpak
Flatpak : This is a single application comes with all its dependencies and run in a sandbox environment.
FlatHub : A central repository for flatpak packages , you can install any package using the flatpak utility hence no need to install FlatHub until it is required.
AppImage : Unlike Snap and Flatpak , AppImage has a simple concept that is , It makes application execution simple and user friendly. They work on simple rule OneApp = OneFile. Just think AppImage application as portable applications in Windows system.You don't need to install an application in a traditional way and no third-party app manager needed, No root permissions required , No kernel interaction needed. All you need , just download the AppImage package , give them execution permission and run. Isn't is simple ? Yes it is.
AppImage packages include necessary libraries in it. They run under the user permissions without communicate or interact with kernel libraries. To make it happen It uses the Linux feature FUSE ( filesystem in userspace).
Unlike Snap and Flatpak , There is no central repository where you can find the AppImage application .However the list of most available AppImages can be found under the official GitHub Appimage page
How to run an AppImage File :
1) just download your AppImage package from the developer site or app provider.
2) give it an execution permissions with sudo chmod a+x *Package.AppImage
3) execute your application with ./Package.AppImage
Terminology in AppImage:
AppImage : A software package in AppImage format which works on one file = one app rule.
AppImageLauncher :You can manage your Appimages with AppImageLauncher. This tool helps you to integrate your Appimage with your system. You dont have to give execution permission to your AppImage application.
To execute / integrate app with your system , double click your AppImage package > click on execution button OR to integrate with system > click "integrate & execute" after double click the AppImage package.
To remove app from system , just open your default app launcher > search for the app > right click on it > click on 'remove '
To install AppImageLauncher run below command (for debian base system).
sudo add-apt-repository ppa:appimagelauncher-team/stable
sudo apt update
sudo apt install appimagelauncher
In Arch Base System
Sudo pacman -S appimagelauncher
AppImageKit : Using AppImageKit you can package desktop applications as AppImages that
run on common Linux-based operating systems, such as RHEL, CentOS,
Ubuntu, Fedora, Debian and derivatives. For More detail
AppImageTool : It converts an AppDir into a self-mounting filesystem image
Conclusion : Now we know what are the difference between Snap, Flatpak and AppImages. Where the Snap and Flatpak exists because there was no universal way to install software package in every Linux distro and Its difficult to remember all package managing commands which are distro specifics, In other hand , AppImage provides the ease & flexibility over installing and managing apps in Linux system without mess with the system configuration. Linux is a powerful operating system with no ease. These app trying to make it easy to use for general people. People love Linux but they scare to use it because they dont want to mess up with it. In near futre there might be some more tools and integration could be seen which makes Linux more powerful yet easy to handle for general users.
Share The Post With Your Friends 😀
0 Comments