Snap

Jump to: navigation, search

Snappy (or Snap) is a distribution-agnostic package management system developed by Canonical. The packages called snaps are self-contained applications running in a sandbox with limited access to the host system.

Icon-warning.png
Warning: Snap does not come pre-installed on openSUSE systems.

Installation

First add the system:snappy project repositories:


Refresh:

sudo zypper --gpg-auto-import-keys refresh

Finally, upgrade the package cache to include the new snappy repository:

sudo zypper dup --from snappy

Snap can now be installed with the following:

sudo zypper install snapd

You then need to either reboot, logout/login or source /etc/profile to have /snap/bin added to PATH.

Configuration

Now enable and start the snapd service with the following command:

sudo systemctl enable --now snapd

Tumbleweed users need to additionally run the following to enable and start the snapd.apparmor service:

sudo systemctl enable --now snapd.apparmor

Note, that the snapd.apparmor service can be enabled regardless of the system using SELinux or AppArmor. The service will only be activated by systemd if the system boots with AppArmor LSM enabled.

Icon-warning.png
Warning: Snap sandbox makes heavy use of and works best with AppArmor, though snaps themselves remain usable when using SELinux

At this point, we recommend restarting your machine. You now have snapd installed and ready to go.

Getting started

To install an app via the command line type:

sudo snap install app

Ex. install the hello snap:

sudo snap install hello
$ snap install hello
hello 2.10 from Canonical✓ installed
$ hello
Hello, world!
$ snap run hello
Hello, world!

See also

External links