snap Cheatsheet
#
snap is a package management system developed by Canonical for installing, updating, and managing software packages on Linux distributions. Snap packages, or “snaps”, are self-contained and work across different Linux distributions.
Basic Commands
#
Command/Option | Example | Description |
---|
snap install | snap install vlc | Install a snap package |
snap remove | snap remove vlc | Remove a snap package |
snap refresh | snap refresh | Update installed snap packages |
snap list | snap list | List installed snap packages |
snap info | snap info vlc | Display information about a snap package |
snap search | snap search vlc | Search for snaps in the Snap Store |
snap run | snap run vlc | Run a snap application |
snap find | snap find vlc | Find snaps available for installation |
snap logs | snap logs vlc | View logs for a snap application |
Application Management
#
Command/Option | Example | Description |
---|
snap set | snap set vlc volume=50 | Set configuration options for a snap |
snap unset | snap unset vlc volume | Remove configuration options for a snap |
snap services | snap services | List all services provided by snap packages |
snap connect | snap connect vlc:camera | Connect a snap to a system interface |
snap disconnect | snap disconnect vlc:camera | Disconnect a snap from a system interface |
Repository Management
#
Command/Option | Example | Description |
---|
snap remote-add | snap remote-add myremote http://myremote.com | Add a new remote repository for snaps |
snap remote-remove | snap remote-remove myremote | Remove a remote repository for snaps |
snap remote-list | snap remote-list | List all remote repositories for snaps |
Advanced Commands
#
Command/Option | Example | Description |
---|
snap download | snap download vlc | Download a snap package to a local file |
snap alias | snap alias vlc.video-player vlc | Create an alias for a snap command |
snap version | snap version | Show the version of the snap tool |
Environment Management
#
Command/Option | Example | Description |
---|
snap install --classic | snap install code --classic | Install a snap package with classic confinement |
snap refresh --channel | snap refresh vlc --channel=beta | Refresh a snap package to a specific channel |
This cheatsheet covers essential snap
commands for managing and configuring snap packages on Linux systems.