Snapcraft is a command line tool that allows developers to build and publish their applications as snaps.
Snapcraft can be installed and used on any supported system, including various Linux distributions as well as the macOS and Windows operating systems.
On Linux distributions with snap support, the easiest way to install snapcraft is via its snap:
sudo snap install snapcraft --classic
The --classic
argument is required because snapcraft uses classic confinement.
A Linux system may have both the repository and snap version of Snapcraft installed at the same time. Typically, the snap version will be the preferred one, and usually the first listed command in the user’s shell command path.
The which
command can be used to check which version of snapcraft is run by default:
$ which snapcraft
/snap/bin/snapcraft
By default, Snapcraft relies on a build provider to create an isolated build environment inside which applications can be built and packaged as snaps without changing the host system. Two build providers are supported:
See Build providers for further details on configuring and using either Multipass or LXD, and for options that don’t require a built provider.
Last updated 1 year, 2 months ago.