Hello, dear friends. Today, you will learn how to install Snap on CentOS 9 Stream. With this, you will be able to install many useful applications using this technology from Canonical.
Snap is the self-sufficient package technology developed by Canonical. As expected, it comes integrated on Ubuntu, but it is also possible to install it in other distributions like CentOS 9 Stream.
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 CentOS 9 Stream 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.
Enable the EPEL repository on CentOS 9 Stream
We have talked about the EPEL repository several times. However, today we need it so that from there, we can install Snap.
In that post, you will have what you need to enable EPEL.
Install Snap on CentOS 9 Stream
Now you can install Snap with this command.
sudo dnf install snapd
Now create a symbolic link, so you can use the binaries without any problems:
sudo ln -s /var/lib/snapd/snap/ /snap
Next, enable and start the Snap service.
sudo systemctl enable --now snapd.socket Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket → /usr/lib/systemd/system/snapd.socket.
If you want to know if
snap is working properly, you have to check the status of the service.
sudo systemctl status snapd.socket
If you get an on-screen output like this, then everything has gone well and snap is now running.
Basic Snap usage
The first thing you need to do is install the
sudo snap install core
As you can see, that is the syntax to install any package. Furthermore, you can search for packages within the
sudo snap find [package]
If you want to refresh all packages
sudo snap refresh
And finally, remove some packages
sudo snap remove [package]
So, enjoy it.
In this post, you learned the basics of using snap. But not only that, you also learned how to install it on CentOS 9 Stream, a compatible system but not by default.