Debian 12 bookworm
Sponsored Link

Snappy : Install2023/06/21

 
Install Snappy that is a software deployment and package management system.
[1] Install and Run Snapd to use Snap packages.
root@dlp:~#
apt -y install snapd
root@dlp:~#
systemctl enable snapd.service snapd.socket

root@dlp:~#
source /etc/profile.d/apps-bin-path.sh

[2] Basic usage of [Snap] command.
# install [hello-world] package

root@dlp:~#
snap install hello-world

hello-world 6.4 from Canonical✓ installed
# list installed packages

root@dlp:~#
snap list

Name         Version    Rev    Tracking       Publisher   Notes
core         16-2.59.4  15419  latest/stable  canonical✓  core
hello-world  6.4        29     latest/stable  canonical✓  -

# search packages with words in Snap repository

root@dlp:~#
snap find kubernetes

Name                         Version               Publisher              Notes    Summary
kubernetes-worker            0.0.2                 canonical✓             -        A complete Kubernetes worker
kubernetes-test              1.27.3                canonical✓             classic  tests for kubernetes
kubernetes-test-eks          1.10.3                canonical-cloud-snaps  classic  tests for kubernetes
microk8s                     v1.27.2               canonical✓             classic  Kubernetes for workstations and appliances
.....
.....

# show package info

root@dlp:~#
snap info hello-world

name:      hello-world
summary:   The 'hello-world' of snaps
publisher: Canonical✓
store-url: https://snapcraft.io/hello-world
contact:   snaps@canonical.com
license:   unset
description: |
  This is a simple hello world example.
commands:
  - hello-world.env
  - hello-world.evil
  - hello-world
  - hello-world.sh
snap-id:      buPKUD3TKqCOgLEjjHx5kSiCpIs5cMuQ
tracking:     latest/stable
refresh-date: today at 21:21 CDT
channels:
  latest/stable:    6.4 2019-04-17 (29) 20kB -
  latest/candidate: 6.4 2019-04-17 (29) 20kB -
  latest/beta:      6.4 2019-04-17 (29) 20kB -
  latest/edge:      6.4 2019-04-17 (29) 20kB -
installed:          6.4            (29) 20kB -

# run application

root@dlp:~#
hello-world

Hello World!
# PATH

root@dlp:~#
which hello-world

/snap/bin/hello-world
root@dlp:~#
ll /snap/bin/hello-world

lrwxrwxrwx 1 root root 13 Jun 20 21:21 /snap/bin/hello-world -> /usr/bin/snap
# disable application

root@dlp:~#
snap disable hello-world

hello-world disabled
root@dlp:~#
snap list

Name         Version    Rev    Tracking       Publisher   Notes
core         16-2.59.4  15419  latest/stable  canonical✓  core
hello-world  6.4        29     latest/stable  canonical✓  disabled

root@dlp:~#
hello-world

-bash: /snap/bin/hello-world: No such file or directory
# enable application

root@dlp:~#
snap enable hello-world

hello-world enabled
root@dlp:~#
hello-world

Hello World!
# uninstall an application

root@dlp:~#
snap remove hello-world

hello-world removed
root@dlp:~#
snap list

Name  Version    Rev    Tracking       Publisher   Notes
core  16-2.59.4  15419  latest/stable  canonical✓  core
Matched Content