If you’re a newbie on Linux, there is a chance that you have faced dependency and repository issues while installing a package on your system. Finding one convenient method to install a package on every major Linux distribution was hard without facing any issues. In the beginning, Canonical started building Snap for only Ubuntu. Later, Snap Package Manager was used widely on other Linux distributions too. You can get compiled versions of applications through Snaps. This provides both CLI and pre-compiled packages for Linux.
Snap Package Manager in Linux Desktop
Snap is available for almost all Linux distributions; even you can deploy it for IoT development. It uses a central package repository to store packages and maintain the sandbox technology to install packages on a machine. Sandbox has made Snaps easy and quick; the loading time of applications is really faster on Snaps. Snap is written in Go and C programming language and has the GPL privacy license.
Snap maintains Snapd, a daemon for running programs on the system’s background, Snapcraft for contribution on the application store, and the Snap Store as a GUI-based application store. In this post, we’ll see how to install Snaps on different Linux distributions.
What Happened Between Linux Mint And Snaps?
No doubt Canonical made Snaps to make the process of installing applications convenient and hassle-free. But, as Snaps use a central repository, mismatches might occur in the repository. Users were concerned, and some actually faced a few bad experiences through Snaps on the Mint distribution. That’s why Linux Mint decided to dismiss Snaps on their system.
However, as Linux uses various open-source applications, it’s not inconceivable that someday you might need to enable Snaps on Linux Mint to install a specific application that only is available on the Snap store. As Mint turned off Snaps’ support, the conventional methods of enabling it would not work for Mint distribution. But no worries, in this post, I’ll also show how you can enable Snaps on your Linux Mint.
1. Install Snap Package Manager on Ubuntu/Debian
As Canonical has made the Snap, installing Snaps on a Ubuntu or other Debian-based Linux system is hassle-free and straightforward. You can run the following aptitude commands on your terminal shell to update the Linux repository and install Snap on your machine. Don’t forget to run the commands as a root user.
sudo apt update
sudo apt install snapd
If you’re using a different Debian-based Linux system, you might need to execute the following commands to get started with the Snap daemon on your system. It’s recommended to execute commands as a root user for installing packages.
First, update the aptitude package repository, then run the next apt command to install the Snap daemon tool on your Debian-based systems.
$ su root
# apt update
# apt install snapd
2. Install Snap Package Manager on Linux Mint
I’ve mentioned earlier that Linux Mint has disowned Snap for a very particular reason. But you can install Snap on it. First, run the following move the nosnap.pref
file on your Home directory from the etc
directory.
sudo mv /etc/apt/preferences.d/nosnap.pref ~
Now, update your system repository and run the following aptitude command to install Snaps on Mint distribution.
sudo apt-get update
sudo apt install snapd
3. Install Snap Package Manager on Arch Linux
If you have an Arch system, you can install Snaps on your machine by cloning the GitHub package. First, run the following command to clone Snap from Github.
git clone https://aur.archlinux.org/snapd.git
Now, open the filesystem directory, and enable the Snap socket on your Arch system.
cd snapd
makepkg -si
sudo systemctl enable --now snapd.socket
Finally, create a soft link of Snaps on your filesystem. Then restart your system to enjoy the Snaps on your Arch distribution.
sudo ln -s /var/lib/snapd/snap /snap
4. Install Snap Package Manager on Red Hat Enterprise
Installing Snaps on a Red Hat Linux requires EPEL (Extra Packages for Enterprise Linux) packages. First, run the following YUM command on the terminal shell to install EPEL.
sudo yum install epel-release
You may now run the following YUM and system control commands to install Snap and create a soft link for Snap on your RHEL.
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
5. Install Snap Package Manager on Fedora Workstation
The latest versions of Fedora Workstation don’t require the EPEL system to install Snap on the system. You can directly run the following DNF command to install Snap on your Fedora Linux.
sudo dnf install snapd
When the installation finishes, don’t forget to create a soft link of Snaps on your filesystem.
sudo ln -s /var/lib/snapd/snap /snap
6. Install Snap Package Manager on Manjaro System
Previously, I’ve shown how to install Snap on an Arch-based Linux system. But, Manjaro KDE also allows installing Snap through the Pacman command. You can run the following Pacmancommand on your terminal shell to install Snap daemon on the system.
sudo pacman -S snapd
Now, run the system control and ln -s commands on the terminal shell to enable Snap and create a soft link.
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
7. Install Snap on SuSE and openSUSE
In SuSE and OpenSuSE Linux distributions, installing the Snap daemon tool requires the Snappy repository installed on the machine. You can run the following zypper command with root access to load the Snappy repository.
$ sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.2 snappy
When the repository installation ends up, you may now run the following zypper commands on the shell to get the GPG keys.
$ sudo zypper --gpg-auto-import-keys refresh
$ sudo zypper dup --from snappy
Finally, you may now execute the following commands to get the Snap daemon on your Linux machine.
$ sudo zypper install snapd
$ sudo systemctl enable --now snapd
Now, run the following system control command to start the Snap daemon on your system.
sudo systemctl start snapd
Install Snap Store on Linux
Snap offers a graphical user interface-based application store, where you can browse packages and click applications through a simple ‘Install’ button. Many Linux distributions offer their own application store to get the most used applications quickly. However, if you need an additional app store, you can run the following snap command on your terminal shell to install the Snap Store on your Linux system.
sudo snap install snap-store
Final Words
From my personal experience, I can say, using Snap Store and commands are really hassle-free. When you run a daemon on your Linux system, nothing happens without your permission. Moreover, you can remove Snaps whenever you want from your system. So, there is no reason to get frightened to use Snaps on your system. You can go through this post to know more about Snap, AppImage, Flatpak if you’re keener to know about Linux package managers.
In the entire post, I’ve described how you can install Snaps on various Linux machines. Please share it with your friends and the Linux community if you find this post useful and informative. You can also write down your opinions regarding this post in the comment section.