Hello, friends. In this post, you will learn how to install Snap on Rocky Linux 8.
Snap is the self-sufficient package technology developed by Canonical. As expected, it comes integrated in Ubuntu, but it is also possible to install it in other distributions like Rocky Linux.
Flatpak is Snap’s natural competitor. Both offer packages that can be run on any distribution that supports them thanks to their box technology. That is to say that in a single package are incorporated all dependencies and libraries needed to run without affecting the system.
Although the repositories of Rocky Linux 8 are extensive and more with EPEL, the truth is that thanks to Snap we can install other applications and further extend the functionality of the system.
Install Snap on Rocky Linux 8
As you might expect, Snap is not included in the official Rocky Linux 8 repositories. However, you can install Snap via the EPEL repository.
First, update the entire system in the terminal.
sudo dnf update
Thereafter, add and enable the EPEL repository by running the following command
sudo dnf install epel-release
After the repository is added, you can install the snap package.
sudo dnf install snapd
Then create a symbolic link
sudo ln -s /var/lib/snapd/snap/snap /snap
Snap works as a system service, so we have to start it.
sudo systemctl enable --now snapd.socket
We can then check the status of this service.
sudo systemctl status snapd.socket
This indicates that snap is ready for use.
Using Snap on Rocky Linux 8
Once snap is installed, you can check the installed version.
snap version
snap 2.54.4-1.el8
snapd 2.54.4-1.el8
series 16
rocky 8.5
kernel 4.18.0-348.12.2.el8_5.x86_64
Thereafter, you can use it without any problems. For example, if you want to search for a package, you can just run.
sudo snap find
This will show you many packages that you can install.
To search for a specific one, run
sudo snap find [name]
Also, If you would like to install any of them or others, you can run
sudo snap install [package-name]
If you want to know all the Snap packages installed on the system, you have to display the contents of the /var/lib/snapd/snaps/
directory.
ls /var/lib/snapd/snaps/`.
core18_2344.snap powershell_200.snap snapd_15177.snap
If you wish to update any package, just run
sudo snap refresh [package]
Or all of them
sudo snap refresh
Finally, if you want to remove a package, you have to execute
sudo snap remove [package]
Conclusion
In this post, you learned the basics of using snap. But not only that, you also learned how to install it on Rocky Linux 8, a compatible system but not by default.