Skip to content

Usage of Snap on Ubuntu

homepage-banner

A snap is an application containerised with all its dependencies.

Snap offers several benefits over traditional package managers like apt. One of the most significant benefits is that Snap packages are self-contained, meaning that they include all the dependencies and libraries required to run the software. This makes it easy to install and run software without worrying about compatibility issues or dependency conflicts.

Snap also provides automatic updates for installed packages. When a new version of a package is released, Snap will automatically download and install the update in the background. This ensures that your software is always up to date and secure.

Another advantage of using Snap is that it provides a sandboxed environment for software. This means that Snap packages are isolated from the rest of the system, which can help prevent security vulnerabilities and conflicts with other software.

Installing

sudo apt update 
sudo apt install snapd 
sudo apt install core 

Common usage

snap version
sudo snap install <snap-name>
sudo snap remove <snap-name>
sudo snap refresh <snap-name>
snap find <package-name>
snap install <package-name> --channel=<channel>

Create your own snap

sudo snap install --classic snapcraft

snapcraft init

snapcraft

Disable snapd

sudo systemctl stop snap*
sudo systemctl disable snapd.service
sudo systemctl disable snapd.socket
sudo systemctl disable snapd.seeded.service
sudo systemctl disable snapd.snap-repair.timer

Reference

  • https://snapcraft.io/
  • https://ubuntu.com/core/services/guide/snaps-intro
  • https://ubuntu.com/tutorials/create-your-first-snap
Leave a message