Open In App

Snap Package Manager on Ubuntu

Last Updated : 10 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Snap is a package management system and software deployment. Generally, these packages are termed as snaps. The tool for using snaps is termed as theĀ snap. Snaps are app packages for cloud, IoT and desktop that are easy to install, and cross-platform.

Snaps works across all the Linux distributions so it activates the utilities and latest apps for the cloud, desktop, servers, etc. Snapd is a daemon or process that manages the full environment of snap. The snap tool of this process is used for interacting with snaps. It keeps track of all the installed apps.

What is a Snap in Linux?

A Snap in Linux is a self-contained software package that is designed to work across various Linux distributions. It is developed by Canonical, it includes all the dependencies and libraries required for an application to run, ensuring compatibility and easier management. They are installed, updated, and managed through the Snap Store, providing a secure and straightforward method for software distribution.

Why is Ubuntu using Snap?

The following are some of the reasons for using snap in Ubuntu operating system:

  • Cross-Distribution Compatibility: It works seamlessly across various Linux distributions acting as cross-platform software.
  • Simplified Dependency Management: It comes with containing all the necessary dependencies to resolve the dependency conflicts.
  • Easy Updates and Rollbacks: It facilitates with supporting for automatic updates and rollbacks helping users to always have the latest stable software.
  • Enhanced Security: It provides security to the applications with defined permissions, and by isolating them from the core system.

How to install Snap on Ubuntu? A Step-By-Step Guide

The following steps guide in how to install the snap on Ubuntu:

Step 1: Use the below command to update the package

$ sudo apt update 
updating-the-pakcages-on-ubuntu

Step 2: Install snapd using the below command

$ sudo apt install snapd
installing snapd on ubuntu

Step 3: Run the below command to test whether snap is installed or not. This command will give some output which is shown in the below image.

$ sudo snap install hello-world
checking-for-snap-installation

Step 4: Execute the below command and check the output

$ hello-world
hello-world-snap-command

Snap Command Options

The following are the snap command options with their examples.

1. Search application

$ snap find app_name
Search-Application-Snap-Command

2. Information about applications

$ snap info app_name
Information-about-applications

3. List all Installed Applications

$ snap list
List-of-Installed-applications-snap-package-manager

4. Updating Applications

$ sudo snap refresh app_name
updating Applications

5. Revert updated applications

$ sudo snap revert app_name
Revert-Updated-Applications-Snap-Package-Manager

6. Disabling applications

$ sudo snap disable app_name
Disabling-Applications-snap-package-manager

7. Enable Applications

$ sudo snap enable app_name
enabling-applications-snap-package-manager

8. Removing application

$ sudo snap remove app_name
Removing-Applications-Snap-Package-Manager

Note: Replace app_name with specific application's name like postman, vlc, spotify, eclipse --classic etc., in all above commands.

Difference between Snap and Apt

The following are the differences between snap and apt:

Feature

Snap

APT

Comptability

It is cross distribution software that works on various linux distributions

it is specific to debian based distributions only like Ubuntu

Dependency Management

It is self-contained with all the dependencies including in it

It will relies on the system wide dependencies.

Update Mechanism

It automatically updates with easy rollback options

It manually make updates through package manager

Security

The applications are sanboxed with defined permissions

It follows traditional package management with less isolation.

Conclusion

Snap offers a versatile package management system for Linux, ensuring cross-platform compatibility and simplified dependency handling. Developed by Canonical, Snaps are easy to install and manage, making them ideal for various applications. With `snapd` and the `snap` command, users can seamlessly handle installation, updates, and maintenance.


Next Article

Similar Reads