Install apps in various Linux distributions using Snaps

By | 17 January 2019


The basics

Installing software in a Linux O.S. it’s equivalent to say install packages.
To install packages there are various package managers.
It’s a crucial component of Linux, in that it keeps track of everything installed; downloads packages; ensures all packages are installed in a common location; helps to upgrade packages; resolves dependencies; and keeps users from having to install from source code.

There are numerous package managers available, each Linux distributions has own system.
Each package manager works with a different file type.
A brief summary of main package managers (there are more package managers out there):

DistributionPackage managerFile type
Debian/Ubuntu and derivatesapt.deb
Red Hat / CentOS / Fedorayum.rpm
SUSE / openSUSEzypper.rpm
Arch Linuxpacman.pkg

Most package managers have GUI front ends.So you can easily install packages etc… using the graphic interface instead specific terminal commands.

Install packages using Snaps

Snaps are basically an application compiled together with its dependencies and libraries and universal for all Linux distributions. You can find and install Snaps using the Snap store.

Some advantages using Snaps:

– universal Linux packages
– Snaps contains all the dependencies and libraries needed to run
– Automatic Updates
– Easier to create and manage for Developers
– One snap is common for every environment (desktop, server, cloud)
– Different releases availability (eg. beta, stable)
– Security: Snaps run in a sandboxed environment, isolated from the rest of your system

In order to use the Snaps first you need to install the Snapd daemon.
If you use Ubuntu 16.04.4 LTS or later, Snapd is already installed.
For other Linux distributions you need to install Snapd, read the official doc for reference.
We can verify that snapd is installed by typing this command from the Linux console:

$ snap version

basic Snap commands

Find a snap:

$ snap find [snap_name]

Install snaps:

$ sudo snap install [snap_name]

List of installed snaps:

$ snap list

Refresh an installed snap: (snaps are periodically updated, but if you need to update manually you can use the following command)

$ sudo snap refresh [snap_name]

Uninstall a snap:

$ sudo snap remove [snap_name]

Snaps integrate with desktop environments, so a typical graphical snap will place one or more icons in the menu or launcher on any modern distribution.
For non-graphical applications, or as a preference, snaps can be run from the command line too.

$ [snap_name]

If executing a command directly doesn’t work, try prefixing it with the /snap/bin path

$ /snap/bin/[snap_name]

or you can use the snap run command:

$ snap run [snap_name]

Snaps are a good alternative to easily install software under Linux instead using the package managers with all benefits described above, in addition there are thousands of snaps available in the Snap Store.

Iscriviti al gruppo Telegram Italian Spaghetti Geeks

News e discussioni sulla tecnologia (internet, computer e mobile, telefonia, sat/DTT e streaming, ecc...), giveaways esclusivi prodotti tech, sconti ed offerte e molto altro ancora!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.