Snap is a software and package management tool described as “the app store for Linux” and is quickly growing in popularity. In Ubuntu 18.04 LTS some utilities have been switched to the snap format, such as the Calculator and System Monitor. A snap is a containerised software package that is simple to install. You can discover more about snap at the official website: https://snapcraft.io/
This article provides a quick introduction to snap commands and usage in Ubuntu 18.04.
Basic snap commands in Ubuntu 18.04.
Snap is included in Ubuntu 18.04 LTS so you can start using it straight away.
List installed snaps
You can find out which snaps are already installed in your Ubuntu system with the following command.
As you can see, there are several snaps already installed in Ubuntu, such as Calculator, Characters, and System Monitor. These snaps are all published by Canonical, which is the Ubuntu team.
The green check beside the publisher name indicates the publisher has been verified. This is important to know because anyone can create a snap for existing software.
Search for snaps
You can easily search the snap store for available snaps from the command line using
snap find [search-term]. For example, to search for the Mozilla Firefox snap:
snap find firefox
In this example, the first result is Firefox v65.0.1-2. The listed version will always be the latest. If you are interested in another version, you can use
snap info [snap-name] (see below).
The green check indicates that the snap publisher Mozilla has been verified.
View snap information
To see more information about a snap, use
snap info [snap-name]. This will show details like the snap name, publisher, license, and software description. If there is are additional versions available these will also be listed.
For example, for the Mozilla Firefox snap:
snap info firefox
To see the usage details of
snap and available commands, use
You can also see more detailed usage information about individual snap commands with
snap help [command].
For example, for the
snap help info
Install the hello-world snap
To demonstrate installing a snap, we’ll install the
hello-world snap published by Canonical.
You can see the details of this snap with the
snap info command:
snap info hello-world
Install this snap with the
snap install command:
snap install hello-world
The snap will be downloaded and installed.
Verify the snap was installed by running
snap list again:
Run the hello-world snap
hello-world snap can be run by using the
You should see “Hello World!” printed to the terminal.