How to Install Snap Applications in Arch Linux

How To Install Snap Applications Arch Linux Featured

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.

How To Install Snap Applications Arch Linux Snapcraft Website

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.

How To Install Snap Applications Arch Linux Supported Distros

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:

How To Install Snap Applications Arch Linux Snap Store

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.

One comment

  1. Author please note that the aur helper yaourt is nolonger under development and has not received an update in quite sometime. This is common knowledge amongst the Arch Linux community and the general consensus is not to use it or recommend the use it.

    Some known issues;
    1. Syncs packages over http and not https.
    2. Known to cause system brankage during updates.
    3. Causes package dependency in problems.

    There are other aur helpers without these issues that are currently still maintained;
    1. yay
    2. pakku
    3. aurutils

    Check the list of aur helpers on the Arch wiki – https://wiki.archlinux.org/index.php/AUR_helpers

    Also downloading aur packages directly for the repository is the general recommended method for installing packages from the aur. Wiki for installing from the aur – https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.