Sometimes, installing software applications in Linux can be a frustrating experience. You might run into missing libraries or dependencies when using the traditional package managers such as APT or DNF. This would then force you to search for the missing library or dependency only to find that it also depends on other dependencies. And this is where snap comes in.
Developed by Canonical and initially released in 2014, Snap is a software packaging system for the Linux operating systems. It makes use of snaps which are containerized packages that encapsulate an application alongside all its libraries, dependencies, configuration files, and other requirements needed for the software to run. Snaps address the issue of missing libraries and dependencies during software installation since all requirements are bundled together. snaps are also universal and distribution agnostic. You can install a snap package on any Linux flavor provided that snap is installed and enabled.
You can search through a wide selection of thousands of snaps hosted on the snap store.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Snap Software Installation queries.
In this context, we shall look into how to install and enable snap on Rocky Linux / AlmaLinux.
How to install and enable snap on Rocky Linux / AlmaLinux ?
1. Install EPEL repository
To begin, we will install the EPEL repository. To do this, execute the command:
$ sudo dnf install epel-release
EPEL provides a host of quality addon packages of Enterprise Linux which are essential in the installation of other packages.
2. Install snapd
Once EPEL is installed, the next step is to install the snapd daemon which, in effect, installs Snap. To achieve this, run the command:
$ sudo dnf install snapd
This basically installs snapd and other additional packages.
Once installed, start the snapd daemon:
$ sudo systemctl start snapd.socket
And enable the service on boot time:
$ sudo systemctl enable snapd.socket
To verify that the snapd daemon is running, execute:
$ sudo systemctl status snapd.socket
You can enable classic snap support by creating a symbolic link from /var/lib/snapd/snap to /snap with the below command:
$ sudo ln -s /var/lib/snapd/snap /snap
To check the version of snap run the command:
$ snap --version
How to use snap to manage snap packages ?
You can run the 'snap' command to get information about snap, its usage, and commonly used command:
For example, to find out the availability of an application as a snap package, run the snap find command followed by the name of the application. For example, to find out if Skype is available, run:
$ sudo snap find skype
To get additional information about the Skype application such as the Publisher, snap store URL licensing and the description about the application, run the command:
$ sudo snap info skype
To install the Skype, execute the command:
$ sudo snap install skype
To remove the Skype application run the command:
$ sudo snap remove skype
[Need support to install any Software on your Linux system ? We can help you. ]