How To Install Snap Package Manager in Linux Distributions

If you’re a newbie on Linux, there is a chance that you had faced dependency and repository issues while installing a package on your system. It was hard to find one convenient method to install a package on every major Linux distribution without facing any issues. In the beginning, Canonical started building Snap for only Ubuntu. Later, Snap Package Manager is 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, it is hassle-free and straightforward to install Snaps on a Ubuntu or other Debian-based Linux system. 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.

snaps on Ubuntu

sudo apt update
sudo 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 the additional 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

snap on Fedora

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

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 to get 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.

Let's block ads! (Why?)


Original page link

Best Cool Tech Gadgets

Top favorite technology gadgets

0 comments:

Post a Comment