How to Use Snap to Find and Install Apps on Ubuntu 20.04
Snappy, also known as Snap, is a package manager for Linux in which a single package, called a snap, can be installed on multiple Linux distributions. This is different from traditional package managers like dpkg, apt, aptitude, rpm, yum, which cater to a single Linux distribution or a group of Linux distributions based on a single distribution.
Snap has a daemon to manage the snaps, called
snapd. The client tool for Snap is called
snap. Snap is pre-installed in Ubuntu 16.04 onwards.
In this article, we will see how to find and install apps using Snap in Ubuntu 20.04.
Finding Apps using Snap
We can use the
find command in
snap to search for packages based on keywords. We can also use the alias for this command,
search. Snap will search for the keyword not only in the package name but also in the description of the package.
snap find "keyword"
If a single keyword is used for searching, it need not be enclosed in quotes. But if more than one keywords are used for searching, quotes must be used.
Notice the green asterisk (*) next to
kde. It implies that the corresponding publisher is a verified publisher.
To search for packages only in “stable”, i.e., not in beta or other states, use
snap find "keyword" --narrow
As we used the flag above, the package
scidvspc-hkvc was not returned by find command this time, since it does not have a stable release.
Snap organizes packages in sections, like games, finance, etc. User can search for packages in a particular section.
First, to see the list of all sections, run:
snap find --section
To search in a particular section, use flag
snap find chess --section="SectionName"
Installing Apps using Snap
We can use the
install command in Snap to install a package.
snap install package_name
The user needs to have
sudo privileges to install a package from Snap. Enter your password when prompted.
Snap will now perform the required steps to install the package and print a progress bar on the terminal.
By default, Snap installs packages from the stable channel. If you wish to install package from a different channel, eg. beta, you can use the flag
snap install <package_name> --beta snap install <package_name> --candidate
A Snap channel is basically a concept used for tracking versions of the packages. You can read more about Channels at the official Snap documentation.
You can read the man page of Snap using
man snap. It has more options related to Snap security confinement levels, etc. Also, refer to the official Snap documentation for a better understanding of Snap concepts.