openSUSE Leap 16

Snap : Install2025/10/16

 

Install Snap that is a software deployment and package management system.

[1] Install and Run Snapd to use Snap packages.
dlp:~ #
zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_16.0 snappy

Adding repository 'snappy' ...............................................................................................[done]
Repository 'snappy' successfully added

URI         : https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_16.0
Enabled     : Yes
GPG Check   : Yes
Autorefresh : Yes
Priority    : 99 (default priority)

Repository priorities are without effect. All enabled repositories share the same priority.

dlp:~ #
zypper -n install snapd tar
dlp:~ #
systemctl enable --now snapd

dlp:~ #
source /etc/profile.d/snapd.sh
[2] Basic usage of [Snap] command.
# list installed packages

dlp:~ #
snap list

No snaps are installed yet. Try 'snap install hello-world'.
# search packages with words in Snap repository

dlp:~ #
snap find kubernetes

Name                         Version               Publisher                 Notes    Summary
kubernetes-test              1.34.1                canonical**               classic  tests for kubernetes
kubernetes-test-eks          1.10.3                canonical**               classic  tests for kubernetes
microk8s                     v1.32.9               canonical**               classic  Kubernetes for workstations and appliances
kata-containers              2.4.2                 katacontainers**          classic  Build lightweight VMs that seamlessly plug into the containers ecosystem
kubectl                      1.34.1                canonical**               classic  Command line client for controlling a Kubernetes cluster.
.....
.....

# install [hello-world] package

dlp:~ #
snap install hello-world

hello-world 6.4 from Canonical✓ installed
dlp:~ #
snap list

Name         Version             Rev    Tracking       Publisher    Notes
core         16-2.61.4-20250626  17247  latest/stable  canonical**  core
hello-world  6.4                 29     latest/stable  canonical**  -
snapd        2.71                25202  latest/stable  canonical**  snapd

# show package info

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 13:01 JST
channels:
  latest/stable:    6.4 2024-02-27 (29) 20kB -
  latest/candidate: 6.4 2024-02-27 (29) 20kB -
  latest/beta:      6.4 2024-02-27 (29) 20kB -
  latest/edge:      6.4 2024-02-27 (29) 20kB -
installed:          6.4            (29) 20kB -

# run application

dlp:~ #
hello-world

Hello World!
# PATH

dlp:~ #
which hello-world

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

lrwxrwxrwx. 1 root root 13 Oct 16 13:01 /snap/bin/hello-world -> /usr/bin/snap
# disable application

dlp:~ #
snap disable hello-world

hello-world disabled
dlp:~ #
snap list

Name         Version             Rev    Tracking       Publisher    Notes
core         16-2.61.4-20250626  17247  latest/stable  canonical**  core
hello-world  6.4                 29     latest/stable  canonical**  disabled
snapd        2.71                25202  latest/stable  canonical**  snapd

dlp:~ #
hello-world

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

dlp:~ #
snap enable hello-world

hello-world enabled
dlp:~ #
hello-world

Hello World!
# uninstall an application
# [snap remove] requires [tar] command on the System

dlp:~ #
snap remove hello-world

hello-world removed
dlp:~ #
snap list

Name   Version             Rev    Tracking       Publisher    Notes
core   16-2.61.4-20250626  17247  latest/stable  canonical**  core
snapd  2.71                25202  latest/stable  canonical**  snapd
Matched Content