If you’re a longtime Linux user, you likely recall how difficult installing new applications could be. Unless it was included with the installer, you usually needed to go through the configure, make, make install process, usually hunting down missing dependencies along the way. Package managers like apt and yum made this much more manageable, but dependencies could still bite you.
You may have heard of Snap, which claims to fix many of these problems. You might have also heard that it’s an Ubuntu-only thing, but fortunately, that’s not true.
What Are Snap Applications?
Snap applications, known as “snaps,” are meant to be distribution-agnostic, so ideally they should run the same no matter which system they run on. To achieve this, most of the dependencies and runtimes an application needs in order to run are bundled into the snap. This means that once you have snap set up and running on your system, adding applications that would otherwise need several dependencies is now much easier.
Snap is backed by Canonical, which is why it is often mentioned around Ubuntu, but it is meant to run on any major Linux distribution. Arch is even an officially supported distribution, so snap is a great way to run apps that aren’t packaged for Arch.
Installing the snapd Daemon
In order to install snaps on your system, you’ll need the snapd daemon installed. While snap officially supports Arch, you’ll need to install it from the Arch User Repository (AUR). Fortunately, this is easy to do using the yaourt tool.
First, install snapd by running the following command:
Now you need to enable the service to run. To do this, simply type the following command:
Installing Snap Applications
Now that you have snap installed, you can use it to install packages as you would any other package manager. For example, to install a particular application using snap, just run the following:
To list the snaps available on your system, run the following:
To search for a package, you can query whether it is available by typing the following:
Finally, to remove a package, simply run this:
Other Snap Tips and Tricks
Snap applications are automatically kept up to date by default, but to manually update all applications, run the following:
Some snaps don’t use the traditional path, which is “/var/lib/snapd/snap.” Instead, they install to “/snap.” In order to support installing these “classic snaps,” simply create a symbolic link with the following command:
Now you’ll be able to install and run these applications, but they’ll be installed alongside all your other snaps. It’s the best of both worlds and also happens to be compliant with the Filesystem Hierarchy Standard.
Conclusion
Snap isn’t the only technology of its sort. Flatpak and AppImage are two similar package systems that aim to sort many of the same problems. That said, with Snap having the backing of Ubuntu, it seems to be the most popular of these formats, at least for now.
Does that mean it’s the best? A while ago, we took at look at Snap and Flatpak to see how they hold up against each other and to find out which one is the best.
Kris Wouk is a writer, musician, and whatever it’s called when someone makes videos for the web.
Our latest tutorials delivered straight to your inbox