I'm a firm believer in using the right tools for the right job. Because I use Linux as my primary operating system, that means I sometimes use open-source software and sometimes use proprietary. For example, I use the LibreOffice office suite (open source) but also use Spotify and Slack (both are proprietary). Very often, to install proprietary software, I have to turn to one of the universal package managers, Snap and/or Flatpak. And, as a Pop!_OS user, I have both installed, so I don't have to miss out on any piece of software I need or want.
Also: How to choose the right Linux desktop distribution
For those who don't know, Snap and Flatpak are package managers that remove the dependency issues that (for a very long time) plagued tools like apt and yum. So, instead of having to first install the required dependencies for a piece of software (or hope the built-in package manager catches them for you), you only have to install the software you need. How does this work?
Snap and Flatpak packages include everything they need to run, all rolled up into a universal 'container' that can be installed on any Linux system. One thing to keep in mind is that Snap and Flatpak are not interchangeable. In fact, these two systems are competitors, each vying to win over the open-source communities and every Linux distribution on the market.
Also: How to install Ubuntu Linux (It's easy!)
At present, Snap is mostly confined to Ubuntu-based distributions and Flatpak to all others. That doesn't mean you can't install Snap on non-Ubuntu distros or Flatpak on Ubuntu distros. You can. As I said, my Pop!_OS desktop distribution (based on Ubuntu) has both Snap and Flatpak and I install applications with both.
But how do you do that?
Let me show you how. In this article, we'll focus on Snap. What I'm going to show you is how to install software from the command line. Fret not, it's actually very simple. You might findyour distribution of choice has Snap support built into the GUI application manager (such as GNOME Software or KDE Plasma's Discover). If your built-in GUI package manager has support for Snap built-in, you won't have to worry about touching the command line. Even so, it's a fun skill to learn. And, if your package manager doesn't include support for the technology, it's something you'll want to know.
Let's talk Snap.
What you'll need:
The only things you'll need for this are a Linux distribution that supports Snap and a user with sudo privileges.
The first thing to do is open the terminal window. This can be done from your desktop menu or Applications Overview.
From the terminal window, issue the following command:
snap --version
The output should look something like this:
snap 2.59.1
snapd 2.59.1
series 16
pop 22.04
If Snap isn't installed, you can install it on Ubuntu-based distributions with the command:
sudo apt-get install snapd -y
For Red Hat-based distributions, you must first install the EPEL repository with:
sudo dnf install epel-release -y
Next, update dnf with:
sudo dnf upgrade
Finally, install Snap with:
sudo dnf install snap -y
Now that Snap is installed, it's time to install something with it. Let's install the popular music-streaming app Spotify.
Also: How to use Spotify's built-in equalizer for better-sounding music
One nice thing about Snap is that the usage is the same, regardless of which Linux distribution you use.
You probably still have the terminal window open from installing Snap. If not, go ahead and open it again.
To install Spotify with Snap, the command is simply:
sudo snap install spotifyThat's it. Spotify will install and you should find it in your desktop menu (or Applications Overview).
Changes are pretty good, as Snap will automatically update your installed packages for you. However, on the off-chance you want to do it manually, the command to do so is:
sudo snap refresh
To remove Spotify from Snap, the command would be:
sudo snap remove spotifyAnd that's all there is to installing software with Snap. One thing to keep in mind is that, if you're unsure if a piece of software is available via Snap, you can search for it with thefind command like so:
snap find NAME
In the command line above, NAME is the name of the software you're looking for. If it shows up in the search, you can install it.