Snap

Snap types & Ubuntu Core

Not every snap is the same kind of thing. A handful of special-purpose snap types are what make Ubuntu Core possible at all — a Linux distribution built entirely out of snaps, with no apt, where even the kernel and bootloader configuration update and roll back exactly like an application does.

Quick reference
What it is
The 5 snap types (app, base, gadget, kernel, snapd) that together assemble into a bootable, atomically-updatable OS.
Mental model
4 system snaps ARE the OS; everything else is an application snap running on top of them.
Key numbers
Exactly one gadget, one kernel, one base, one snapd per device — but any number of application snaps.
Reach for it when
Building an Ubuntu Core image, porting to new hardware (a new gadget snap), or packaging an edge-AI inference snap.

The five formal snap types

The type: field in snapcraft.yaml accepts exactly five values. If you omit it, you get app.

type:ContainsRole
appAn application and its bundled dependencies.What you install to run your own software — the overwhelming majority of snaps in the store.
baseA minimal root filesystem (core libraries, no kernel) — e.g. core22, core24.The runtime foundation every strictly-confined app-type snap mounts alongside itself.
gadgetBootloader configuration, partition layout (gadget.yaml), device tree overlays.Device-specific: describes the hardware target and how the device boots.
kernelThe Linux kernel image, modules, and initrd.What the bootloader actually boots into.
snapdThe snapd daemon itself.Distributed as a snap so the snap manager can be updated and rolled back the same way as everything else.

"System snap" vs. "application snap"

These two terms aren't values of type: — they're everyday shorthand for grouping the five formal types by role:

System snapsApplication snaps
Formal typesbase, gadget, kernel, snapdapp
Who installs themChosen once, at image build time, by whoever assembles the Ubuntu Core image for a device model.Anyone, any time — installed and removed like a normal package.
What they doCollectively are the operating system — boot chain, kernel, and base userspace.Run on top of the OS the system snaps provide.
Typical count on a deviceExactly one of each (one gadget, one kernel, one base, one snapd).As many as the device needs.

In other words: on an Ubuntu Core device, the four system snaps are the OS image, and everything else on the device is an application snap running on top of them.

Gadget snap, in depth

The gadget snap is the one piece of an Ubuntu Core image that's genuinely specific to a board. It carries its own manifest, meta/gadget.yaml, describing:

Building a new board target usually means writing a new gadget snap, not touching the kernel or base snaps at all — the split is deliberate, so board-specific bring-up work stays isolated from the rest of the OS.

Kernel snap, in depth

Packages the kernel image, loadable modules, and initrd that the bootloader (configured by the gadget snap) actually boots. On secure devices it's signed, and forms one link in the same chain of trust described in Bootloader fundamentals — the gadget's bootloader stanza verifies the kernel snap's signature before jumping to it. Updating the kernel snap is an atomic, rollback-capable operation exactly like updating an application snap.

Base and snapd snaps

The base snap (e.g. core22) supplies the minimal userspace — C library and friends — that runs on top of the kernel and underneath every application snap; on an Ubuntu Core device it effectively is the root filesystem. The snapd snap ships the snap daemon itself, so the component responsible for updating everything else can also be updated and rolled back the same way.

How they combine to boot Ubuntu Core

Boot stack: gadget's bootloader config, then kernel snap, then base snap, then snapd, then application snaps on top Bootloader (configured by the gadget snap) u-boot / grub — partition layout, device tree Kernel snap Linux kernel, modules, initrd — signed for secure boot Base snap (e.g. core22) Minimal root filesystem every app runs against snapd — manages everything above and below it Application snaps — as many as the device needs
Everything except the bottom row is a snap — including the kernel and the boot configuration. Every layer updates atomically and can roll back independently.

Two properties fall out of this directly: atomic, transactional updates (each snap is a whole immutable image — an update either fully applies or fully doesn't) and automatic rollback (if a freshly-updated kernel or base snap fails a health check on boot, the bootloader falls back to the previous working revision without operator intervention — critical for devices nobody can walk up to and re-flash).

Inference snaps

"Inference snap" isn't a formal type: — it's a common real-world pattern for how edge-AI workloads get packaged: an ordinary type: app snap purpose-built to run a machine learning inference engine (and often a model) on the device, as opposed to an app snap that's, say, a web server or a CLI tool. They show up constantly on NPU-equipped boards (e.g. an i.MX8MP) running Ubuntu Core.

What tends to make an inference snap look different from a typical app snap:

Real-world applications

Gotchas

Field notes