Home Learn Linux What are Snaps and how to install it on various Linux distributions

What are Snaps and how to install it on various Linux distributions

by Kiran Kumar
snap

Snaps are the Canonical’s way of providing packages that can install on any Linux distribution. For those who never heard of Canonical, it’s the company that develops Ubuntu.

What are Snaps?

Snaps are created similarly as any other Linux app, except that a single package is compiled along with all the dependencies required for the app to function. It’s a self-contained package similar to AppImage, with the latter being only a portable app. Therefore, installation of snaps packages is tremendously successful, unlike the standard packages that often break due to unresolved dependencies. Snap packages are available for desktop, cloud, and IoT devices as well. They are easy to install, secure, cross-platform and dependency-free.

What You Should Know

  • Snap is both the command line interface and the application package format.
  • Snapd – It is the background service that manages and maintains the snaps installed on the computer.
  • Snapcraft – It is the command and the framework used to build snaps.
  • Snap Store – is the app store where developers can upload the snaps and users can install apps from.

Advantages of Snaps

Snaps are a great thing that has ever happened to the Linux community. With several Linux distributions getting churned out every month, it’s users who are faced with a confusing ordeal on which Linux distro to choose. Users often need to make a hard choice whether to select a distro that has most supported apps or whether to go with a distro that’s built on the latest technologies. Snaps aims to fill these holes and make an app available on all Linux distros. Here are the advantages of Snaps.

  • Controlling Updates: Snaps can automatically update, but also possible to manually control if needed
  • Snapshots: Save, backup and restore the state of one or more installed snaps
  • Parallel Installs: Install more than one version of the same snap on your system
  • Latest Updates: Latest stable releases gets available fast due to channels created in the snap store

Snap installation on Linux distributions

Snaps can be used on all major Linux distributions, including Ubuntu, Linux Mint, Debian, Fedora, and all their derivatives. This article covers each one of them in a step-by-step process.

1. Install snap on Ubuntu

Snap is pre-installed and ready to go on  Ubuntu 16.04.4 LTS (Xenial Xerus) or later, including Ubuntu 18.04 LTS (Bionic Beaver) and Ubuntu 18.10 (Cosmic Cuttlefish). For all other versions, launch the Terminal and fire the following commands:

sudo apt update
sudo apt install snapd

Restart or log out and log in again, to complete the installation.

2. Install snap on Arch Linux

Launch Terminal and enter the following commands one at a time.

git clone https://aur.archlinux.org/snapd.git
cd snapd
makepkg -si
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

Restart to complete the installation.

3. Install snap on CentOS

Launch Terminal and enter the following commands one at a time.

sudo yum install epel-release
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

Restart to complete the installation.

4. Install snap on Debian

Snap is currently unavailable on versions of Debian prior to 9. Launch Terminal and enter the following commands:

su root
apt update
apt install snapd

Restart to complete the installation.

5. Install snap on Linux Mint, elementary OS

Open Terminal from the Applications launcher and type the following:

sudo apt update
sudo apt install snapd

Restart or logoff and login again to complete the installation.

6. Install snap on Fedora

Open Terminal from the Activities and type the following:

sudo dnf install snapd
sudo ln -s /var/lib/snapd/snap /snap

Restart or logoff and login again to complete the installation. That’s it.

7. Install snap on Solus

Solus 3 and above come with snap installed by default. On older versions, launch the terminal from the System Tools menu and enter the following:

sudo eopkg up
sudo eopkg install snapd

Reboot the computer to finish the installation.

sudo reboot

8. Install snap on Manjaro Linux

sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

Reboot the computer to finish the installation.

How to install the Snap Store app

In order to take full advantage of the snap, installing snap store on your Linux distribution gets you closer to the wide range of ready to install apps. Let’s install Snap Store.

Launch the Terminal and enter the following command:

sudo snap install snap-store

That’s it! You can launch Snap Store from the Application launcher, and then browse through thousands of snaps.

Snap Store

Snap Store

You may also like

4 comments

Miguel Silva October 2, 2019 - 4:35 PM

Hi, in centos 8 package does not exist

Reply
Cedric Norman March 20, 2020 - 10:14 AM

It’s located in the EPEL repository.

Reply
GuilhermeBRS November 5, 2020 - 7:45 PM

Thanks . The article helped me! 🙂

Reply
Tony November 14, 2020 - 1:54 PM

Is just a simple “thank you” sufficient?
No, it should be more
I have loved your contribution for every character you typed
Thanks man!!!

Reply

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.