How to Install snapd On OpenSUSE Tumbleweed
In this short article we will learn how to install snapd on OpenSuse Tumbleweed operating system.
Introduction
Snapd, a universal package manager, has revolutionized software deployment on Linux systems. Developed by Canonical, the company behind Ubuntu, Snapd introduces a novel approach to packaging and distributing applications. In this article, we will explore the fundamental concepts behind Snapd, its key features, advantages, and how it is changing the landscape of Linux software distribution.
Understanding Snapd Basics
Snapd is a software utility that manages snaps, which are self-contained, containerized packages containing an application and its dependencies. Unlike traditional package managers, Snapd packages encapsulate everything needed to run an application, reducing dependency issues and ensuring consistent behavior across different Linux distributions.
Key Features of Snapd
- Cross-Distribution Compatibility: Snapd is designed to work across various Linux distributions, eliminating compatibility issues and making it easier for developers to target multiple platforms.
- Sandboxed Applications: Snaps run in a confined environment, enhancing security by isolating them from the host system and other applications.
- Atomic Updates: Snapd supports atomic updates, ensuring that applications are updated or rolled back as a single, atomic operation, minimizing the risk of update failures.
- Dependency Management: Snaps include their dependencies, reducing conflicts and simplifying the installation process.
How To Install Snapd on OpenSuse
To install snapd on OpenSuse is a simple process. Here is the installation steps :
- Add the repository
- Import GPG Key
- Install snapd on OpenSuse Tumbleweed
1. Add snapd Repository To OpenSuse Tumbleweed
The first step to install snapd is to add the snappy repository. For OpenSuse Tumbleweed users, ca do the following command:
$ sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed snappy
Output :
ramansah@bckinfobckinfo:~> sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed snappy Adding repository 'snappy' .................................................................................................................................[done] Repository 'snappy' successfully added URI : https://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed Enabled : Yes GPG Check : Yes Autorefresh : Yes Priority : 99 (default priority) Repository priorities are without effect. All enabled repositories share the same priority.
2. Import its GPG key
The next step is to import GPG key by using new repository added. We will submit following command :
$ sudo zypper --gpg-auto-import-keys refresh
Output :
ramansah@bckinfobckinfo:~> sudo zypper --gpg-auto-import-keys refresh Repository 'Main Repository (NON-OSS)' is up to date. Repository 'Main Repository (OSS)' is up to date. Repository 'Main Update Repository' is up to date. Repository 'openSUSE-20240131-0' is up to date. Repository 'Open H.264 Codec (openSUSE Tumbleweed)' is up to date. Repository 'Databases (openSUSE_Tumbleweed)' is up to date. Automatically importing the following key: Repository: snappy Key Fingerprint: 4F2F A05B 2C65 89C3 FD12 055E F7C6 E425 ED34 0235 Key Name: system:snappy OBS Project <system:snappy@build.opensuse.org> Key Algorithm: RSA 2048 Key Created: Mon 02 Jan 2023 01:51:03 PM WIB Key Expires: Wed 12 Mar 2025 01:51:03 PM WIB Rpm Name: gpg-pubkey-ed340235-63b27ed7 Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If you are not sure whether the presented key is authentic, ask the repository provider or check their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they are using. Retrieving repository 'snappy' metadata ....................................................................................................................[done] Building repository 'snappy' cache .........................................................................................................................[done] All repositories have been refreshed.
Upgrade Package Cache
The next step is to upgrade the package cache to include the new snappy repository by submitting command :
$ sudo zypper dup --from snappy
Output :
ramansah@bckinfobckinfo:~> sudo zypper dup --from snappy Loading repository data... Reading installed packages... Computing distribution upgrade... Nothing to do.
3. Installing snapd
After all are set, then we can install snapd on OpenSuse Tumbleweed by submitting command line :
$ sudo zypper install snapd
Output :
ramansah@bckinfobckinfo:~> sudo zypper install snapd Loading repository data... Reading installed packages... Resolving package dependencies... The following 2 NEW packages are going to be installed: snapd squashfs 2 new packages to install. Overall download size: 16.5 MiB. Already cached: 0 B. After the operation, additional 63.5 MiB will be used. Continue? [y/n/v/...? shows all options] (y): y Retrieving: squashfs-4.6.1-2.3.x86_64 (Main Repository (OSS)) (1/2), 225.3 KiB Retrieving: squashfs-4.6.1-2.3.x86_64.rpm ............................................................[done (200.0 KiB/s)] Retrieving: snapd-2.61.1-1.15.x86_64 (snappy) (2/2), 16.2 MiB Retrieving: snapd-2.61.1-1.15.x86_64.rpm ...............................................................[done (1.3 MiB/s)] Checking for file conflicts: .......................................................................................[done] (1/2) Installing: squashfs-4.6.1-2.3.x86_64 ........................................................................[done] /usr/libexec/snapd/snap-confine: no configuration entry in active permission profiles found. Cannot check this path. Please reboot, logout/login or source /etc/profile to have /snap/bin added to PATH. On a Tumbleweed and Leap 15.3+ systems you need to run: systemctl enable snapd.apparmor.service (2/2) Installing: snapd-2.61.1-1.15.x86_64 .........................................................................[done] Running post-transaction scripts ...................................................................................[done] ramansah@bckinfobckinfo:~> sudo systemctl enable --now snapd Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /usr/lib/systemd/system/snapd.service. ramansah@bckinfobckinfo:~> sudo systemctl enable --now snapd.apparmor Created symlink /etc/systemd/system/multi-user.target.wants/snapd.apparmor.service → /usr/lib/systemd/system/snapd.apparmor.service.
After installation is completed done, then we will verify it by using command line :
$ snap --version
Output :
ramansah@bckinfobckinfo:~> snap --version snap 2.61.1 snapd 2.61.1 series 16 opensuse-tumbleweed 20240201 kernel 6.7.2-1-default
This is it, we have installed snapd on OpenSuse Tumbleweed, then we can use it in new package installation on the system easily.
Conclusion
Snapd has emerged as a game-changer in the Linux software distribution landscape, offering a seamless and secure way to deploy applications across diverse Linux distributions. As Snapd continues to evolve, it is likely to play a significant role in shaping the future of Linux application packaging and distribution.