Snap is a Linux package manager, an alternative to the traditional apt, rpm, yum, etc. Since Linux runs on many different distributions, I use the word Linux rather than a single specific distribution. You can install Snap packages on most Debian-based distributions like Ubuntu, various Ubuntu flavours, elementary OS, Linux Mint, Fedora, and more.

The Snap Store allows users to install apps, CLIs, GUIs, etc, similarly to how applications are installed on mobile operating systems. If you wanted to see just how simple it is to install applications with Snap, let’s use VS Code as an example.

sudo snap install code --classic

Installing the same application requires just one command, universal across 12 Linux distributions!

The benefits don’t just end with being easier for the user to install either. 

Developers often have a hard time maintaining different package formats and updates across many different distributions. Canonical has addressed this issue with Snap. The Snap package format appears to be a success as more applications are offering Snap packages, which helps ease the burden on both developers and package maintainers. 

As an alternative to DEB packages for Debian/Ubuntu and RPM packages for Fedora, you can use Snap packages, which will work on all Linux distributions that support Snap packages.

Main Reasons to Use Snap Packages

  • Updates Automatically – Snap packages update automatically. By doing so, you are always running the most current version. Snap packages are isolated, so updating them won’t cause conflicts with dependencies.
  • Improved Security – Compared to non-snap packages, snap packages are much more secure in general. Here’s how. Having auto-updates means that security issues are patched swiftly, but more importantly, the packages installed via snap are isolated from the rest of the system. Their file system is separate from other apps on your computer, so they can’t interfere with them. Malicious apps cannot escape their silos even if you installed them intentionally. While no system can guarantee 100% security, snaps give you a better level of protection than before.
  • You Can Vary the Release Channel – Have you ever wanted to get your hands on that new killer feature, but it’s still in beta? With Snap packages, you can change to the stable, beta, or nightly release channel with ease. It is also possible to switch between channels at any time, so you have a lot of flexibility.
  • Easier for Developers and Maintainers – As we have eluded to above, snap packages can easily be created and target multiple distributions, making it easier for developers to distribute software to Linux users. Now, Linux users can easily access software such as Slack, Visual Studio Code, Spotify, Discord, Skype, and many more.

How to Install Snap

Debian

sudo apt update
sudo apt install snapd
sudo snap install core

Arch Linux

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

Fedora

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

CentOS 7.6+

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

elementary OS, KDE Neon, Ubuntu & Kubuntu

sudo apt update
sudo apt install snapd

Linux Mint

(only run the top command if you are running Linux Mint 20)

sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update
sudo apt update
sudo apt install snapd

Manjaro

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

Raspberry Pi

sudo apt update
sudo apt install snapd
sudo reboot
sudo snap install core

Conclusion: 

Before Snap there was no universal way to install an application across all Linux distributions because they all run different package managers and formats. Snap can resolve this problem, overcoming some common installation issues like dependency conflicts and making sure your software is up-to-date! Snap provides a powerful solution to these issues while simultaneously easing the burden on software developers.

Similar Posts