Installation Guide
Learn how to install and configure snap on your system
guide
Snap is a modern package management system created by Canonical that lets you distribute applications as self‑contained “snaps.” Each snap bundles its own dependencies, runs in a confined environment for strong isolation, and receives automatic updates. This guide walks you through installing snapd on popular Linux distributions, configuring common options, managing snaps, and troubleshooting typical issues—all in a clear, technical yet approachable style.
Prerequisites
- Systemd support – snapd relies on systemd services; older init systems may need manual setup.
- Internet access – snaps are downloaded from the Snap Store.
- Disk space – snaps can be 100 MB–1 GB each, so ensure enough free space.
Installation Steps by Distribution
| Distribution | Commands |
|---|---|
| Ubuntu 18.04+ / Debian 10+ | sudo apt update && sudo apt install snapd |
| Fedora 30+ | sudo dnf install snapdsudo systemctl enable --now snapd.socket |
| CentOS / RHEL 8+ | sudo yum install epel-releasesudo yum install snapdsudo systemctl enable --now snapd.socket |
| Arch Linux | sudo pacman -S snapdsudo systemctl enable --now snapd.socket |
| openSUSE Leap 15.3+ | sudo zypper install snapdsudo systemctl enable --now snapd.socket |
Post‑Installation Checklist
- Verify snapd is running –
systemctl status snapd.service(the main service) orsystemctl status snapd.socket(the socket that activates snapd). - Refresh your session – log out and back in or reboot so the
snapcommand appears in your PATH. - Test with a simple snap
You should see a greeting message.sudo snap install hello-world hello-world
Common Configuration Options
| Option | Description | How to Set |
|---|---|---|
| Auto‑refresh | Snap packages update automatically in the background. | sudo snap set system refresh.retain=2 (keeps the last two revisions). |
| Disable auto‑refresh | Useful on servers or when bandwidth is limited. | sudo snap set system refresh.timer=00:00 (disables). |
| Classic confinement | Grants a snap full system access, like traditional packages. | sudo snap install <snap> --classic |
| Snap store mirror / proxy | Use a different mirror or proxy for faster downloads. | sudo snap set system proxy.http="http://proxy:port"sudo snap set system proxy.https="https://proxy:port" |
| Snapd debugging | Enables verbose logs for troubleshooting. | sudo snap set system debug=true |
Managing Snaps
snap list– list installed snaps.snap remove <snap>– uninstall a snap.snap refresh <snap>– manually update a snap.snap info <snap>– view detailed information.snap find <keyword>– search the Snap Store.
Confinement & Interfaces
- Strict confinement (default) limits a snap’s filesystem access to a predefined set of directories.
- Classic confinement is required for snaps that need full system access (e.g., IDEs, Docker).
- Snap interfaces expose specific capabilities such as
networkorhome.- View connections:
snap connections <snap> - Grant access:
snap connect <snap>:<interface>
- View connections:
Troubleshooting Common Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
snap command not found |
snapd not in PATH or not restarted | Log out/in or sudo systemctl restart snapd |
| Snap install fails with “cannot connect to snapd” | snapd.socket not active | sudo systemctl enable --now snapd.socket |
| Snap updates stuck | Disk full or network issue | Free space, check network, sudo snap refresh --list |
| Snap not launching | Confined app missing interface | sudo snap connect <snap>:<interface> |