Introduction
A .snap file is a package for Snap,
Canonical’s system for distributing Linux applications with the libraries they need.
Snaps are installed and kept up to date by the snapd service, usually
from the Snap Store, and run confined, with access to the rest of the system only
through declared interfaces. Snap is built into Ubuntu and can be added to many other
distributions.
Structure
A snap is a SquashFS filesystem image, so it starts with the SquashFS magic
hsqs (68 73 71 73). It is not unpacked when installed: snapd
mounts it read-only, and each revision stays a separate image so an update can be rolled
back. Inside, meta/snap.yaml gives the snap’s name, version, the commands
it provides and the interfaces it uses; the rest of the image holds the application’s
files.
Links
Software
- snapd, with the
snapcommand, which installs and runs them (Linux) - Snapcraft, which builds them (Linux)
unsquashfs, from squashfs-tools, which extracts the files (Linux)
Reference
- Snap documentation, Canonical