How To Install Snap On Fedora 38

How To Install Snap On Fedora 38

In this short article we will learn how to install Snap on Fedora 38 operating system.

Introduction

In the world of Linux, software distribution and package management can be a complex and often fragmented process. Different distributions use different package formats and package managers, making it challenging for developers to create software that’s compatible across various Linux flavors. Enter Snapd, a software package and management system that aims to simplify software distribution by providing a universal package format that works across different Linux distributions.

What is Snapd?

Snapd is the package manager and runtime environment for Snap packages. A Snap package is a self-contained software package that includes all the necessary libraries and dependencies to run the application. These packages are designed to be portable across Linux distributions, making it easier for developers to distribute and users to install software. Snapd is developed and maintained by Canonical, the company behind Ubuntu, but it is available for a wide range of Linux distributions.

Key Features of Snapd

  1. Cross-Distribution Compatibility. Snap packages are designed to work on various Linux distributions, including Ubuntu, Fedora, Debian, CentOS, and more. This cross-compatibility simplifies software distribution for developers.
  2. Sandboxing. Snap packages run in a confined environment, which enhances security by isolating the application from the rest of the system. This sandboxing helps prevent potential conflicts and vulnerabilities.
  3. Automatic Updates. Snap packages are configured to receive automatic updates, ensuring that users always have access to the latest versions and security patches.
  4. Transaction Rollback. Snapd includes a feature that allows you to roll back to a previous version of a Snap package if an update causes issues. This is especially helpful for system stability.
  5. Dependency Management. Snap packages include all the necessary dependencies, reducing the chances of compatibility issues with the underlying system libraries.

Key Features of Snapd

  1. Cross-Distribution Compatibility. Snap packages are designed to work on various Linux distributions, including Ubuntu, Fedora, Debian, CentOS, and more. This cross-compatibility simplifies software distribution for developers.
  2. Sandboxing. Snap packages run in a confined environment, which enhances security by isolating the application from the rest of the system. This sandboxing helps prevent potential conflicts and vulnerabilities.
  3. Automatic Updates. Snap packages are configured to receive automatic updates, ensuring that users always have access to the latest versions and security patches.
  4. Transaction Rollback. Snapd includes a feature that allows you to roll back to a previous version of a Snap package if an update causes issues. This is especially helpful for system stability.
  5. Dependency Management. Snap packages include all the necessary dependencies, reducing the chances of compatibility issues with the underlying system libraries.

How To Install Snapd

The installation Snapd process may vary slightly depending on our distribution. Here’s a general overview of the installation process:

  • Update Fedora Linux System
  • Install Snapd on Fedora
  • Enable classic snap support on Fedora
  • Verify snapd installation

Step 1: Update Fedora Linux System

Before installing new package on the Fedora system, we are advised to update our system first. For this purpose we will submit following command line :

$ sudo dnf clean all
$ sudo dnf update

Step 2: Install Snapd on Fedora

At this point, we will install snapd by submitting command line :

 $ sudo dnf install snapd

Output :

ramansah@bckinfo ~]$ sudo dnf install snapd
[sudo] password for ramansah: 
Last metadata expiration check: 2:35:03 ago on Wed 08 Nov 2023 02:15:42 AM CET.
Dependencies resolved.
==================================================================================================================
 Package                       Architecture           Version                        Repository              Size
==================================================================================================================
Installing:
 snapd                         x86_64                 2.58.3-1.fc38                  fedora                  15 M
Installing dependencies:
 snap-confine                  x86_64                 2.58.3-1.fc38                  fedora                 2.7 M
 snapd-selinux                 noarch                 2.58.3-1.fc38                  fedora                 192 k

Transaction Summary
==================================================================================================================
Install  3 Packages

Total download size: 18 M
Installed size: 63 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): snapd-selinux-2.58.3-1.fc38.noarch.rpm                                      43 kB/s | 192 kB     00:04    
(2/3): snap-confine-2.58.3-1.fc38.x86_64.rpm                                      613 kB/s | 2.7 MB     00:04    
(3/3): snapd-2.58.3-1.fc38.x86_64.rpm                                             761 kB/s |  15 MB     00:20    
------------------------------------------------------------------------------------------------------------------
Total                                                                             854 kB/s |  18 MB     00:21     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                          1/1 
  Running scriptlet: snapd-selinux-2.58.3-1.fc38.noarch                                                       1/3 
  Installing       : snapd-selinux-2.58.3-1.fc38.noarch                                                       1/3 
  Running scriptlet: snapd-selinux-2.58.3-1.fc38.noarch                                                       1/3 
  Installing       : snap-confine-2.58.3-1.fc38.x86_64                                                        2/3 
  Installing       : snapd-2.58.3-1.fc38.x86_64                                                               3/3 
  Running scriptlet: snapd-2.58.3-1.fc38.x86_64                                                               3/3 
Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket โ†’ /usr/lib/systemd/system/snapd.socket.
Created symlink /etc/systemd/user/sockets.target.wants/snapd.session-agent.socket โ†’ /usr/lib/systemd/user/snapd.session-agent.socket.

  Running scriptlet: snapd-selinux-2.58.3-1.fc38.noarch                                                       3/3 
  Running scriptlet: snapd-2.58.3-1.fc38.x86_64                                                               3/3 
  Verifying        : snap-confine-2.58.3-1.fc38.x86_64                                                        1/3 
  Verifying        : snapd-2.58.3-1.fc38.x86_64                                                               2/3 
  Verifying        : snapd-selinux-2.58.3-1.fc38.noarch                                                       3/3 

Installed:
  snap-confine-2.58.3-1.fc38.x86_64      snapd-2.58.3-1.fc38.x86_64      snapd-selinux-2.58.3-1.fc38.noarch     

Complete!

Step 3 : Enable classic snap support on Fedora

Snaps is using classic confinement, it requires a symlink from /var/lib/snapd/snap to /snap. For this purpose we will submit following command line :

$ sudo ln -s /var/lib/snapd/snap /snap

Step 4 : Verify snapd installation

We will verify the snapd version by submitting command line :

$ snap version

Output :

[ramansah@bckinfo ~]$ snap version
snap    2.58.3-1.fc38
snapd   2.58.3-1.fc38
series  16
fedora  38

Conclusion

Snapd simplifies the process of managing software on Linux by providing a universal packaging format that works seamlessly across various distributions. It streamlines software distribution for developers and offers users a reliable and secure way to access applications. Whether you’re using Ubuntu or another Linux distribution, Snapd can help you access a wide range of software quickly and easily.

(Visited 44 times, 1 visits today)

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *