Snaps are the Canonical’s way of providing packages that can install on any Linux distribution. For those who never heard of Canonical, it’s the company that develops Ubuntu.
What are Snaps?
Snaps are created similarly as any other Linux app, except that a single package is compiled along with all the dependencies required for the app to function. It’s a self-contained package similar to AppImage, with the latter being only a portable app. Therefore, installation of snaps packages is tremendously successful, unlike the standard packages that often break due to unresolved dependencies. Snap packages are available for desktop, cloud, and IoT devices as well. They are easy to install, secure, cross-platform and dependency-free.
What You Should Know
- Snap is both the command line interface and the application package format.
- Snapd – It is the background service that manages and maintains the snaps installed on the computer.
- Snapcraft – It is the command and the framework used to build snaps.
- Snap Store – is the app store where developers can upload the snaps and users can install apps from.
Advantages of Snaps
Snaps are a great thing that has ever happened to the Linux community. With several Linux distributions getting churned out every month, it’s users who are faced with a confusing ordeal on which Linux distro to choose. Users often need to make a hard choice whether to select a distro that has most supported apps or whether to go with a distro that’s built on the latest technologies. Snaps aims to fill these holes and make an app available on all Linux distros. Here are the advantages of Snaps.
- Controlling Updates: Snaps can automatically update, but also possible to manually control if needed
- Snapshots: Save, backup and restore the state of one or more installed snaps
- Parallel Installs: Install more than one version of the same snap on your system
- Latest Updates: Latest stable releases gets available fast due to channels created in the snap store
Snap installation on Linux distributions
Snaps can be used on all major Linux distributions, including Ubuntu, Linux Mint, Debian, Fedora, and all their derivatives. This article covers each one of them in a step-by-step process.
1. Install snap on Ubuntu
Snap is pre-installed and ready to go on Ubuntu 16.04.4 LTS (Xenial Xerus) or later, including Ubuntu 18.04 LTS (Bionic Beaver) and Ubuntu 18.10 (Cosmic Cuttlefish). For all other versions, launch the Terminal and fire the following commands:
sudo apt update
sudo apt install snapd
Restart or log out and log in again, to complete the installation.
2. Install snap on Arch Linux
Launch Terminal and enter the following commands one at a time.
git clone https://aur.archlinux.org/snapd.git
cd snapd
makepkg -si
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
Restart to complete the installation.
3. Install snap on CentOS
Launch Terminal and enter the following commands one at a time.
sudo yum install epel-release
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
Restart to complete the installation.
4. Install snap on Debian
Snap is currently unavailable on versions of Debian prior to 9. Launch Terminal and enter the following commands:
su root
apt update
apt install snapd
Restart to complete the installation.
5. Install snap on Linux Mint, elementary OS
Open Terminal from the Applications launcher and type the following:
sudo apt update
sudo apt install snapd
Restart or logoff and login again to complete the installation.
6. Install snap on Fedora
Open Terminal from the Activities and type the following:
sudo dnf install snapd
sudo ln -s /var/lib/snapd/snap /snap
Restart or logoff and login again to complete the installation. That’s it.
7. Install snap on Solus
Solus 3 and above come with snap installed by default. On older versions, launch the terminal from the System Tools menu and enter the following:
sudo eopkg up
sudo eopkg install snapd
Reboot the computer to finish the installation.
sudo reboot
8. Install snap on Manjaro Linux
sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
Reboot the computer to finish the installation.
How to install the Snap Store app
In order to take full advantage of the snap, installing snap store on your Linux distribution gets you closer to the wide range of ready to install apps. Let’s install Snap Store.
Launch the Terminal and enter the following command:
sudo snap install snap-store
That’s it! You can launch Snap Store from the Application launcher, and then browse through thousands of snaps.
4 comments
Hi, in centos 8 package does not exist
It’s located in the EPEL repository.
Thanks . The article helped me! 🙂
Is just a simple “thank you” sufficient?
No, it should be more
I have loved your contribution for every character you typed
Thanks man!!!