How to install Snap on CentOS 9 Stream

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

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.

How to enable the EPEL repository in CentOS 9 Stream

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
Install snap on CentOS 9 Stream
Install snap on CentOS 9 Stream

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
Snap service status
Snap service status

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 core package

sudo snap install core

As you can see, that is the syntax to install any package. Furthermore, you can search for packages within the snap catalog

sudo snap find [package]
Using snap on CentOS 9 Stream
Using snap on CentOS 9 Stream

If you want to refresh all packages

sudo snap refresh

And finally, remove some packages

sudo snap remove [package]

So, enjoy it.

Conclusion

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.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

2 COMMENTS

  1. Hi Angelo.

    here is an error:
    sudo ln -s /var/lib/snapd/snap/snap/snap/snap /snap

    correct is:
    sudo ln -s /var/lib/snapd/snap /snap

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook