The Wayback Machine - https://web.archive.org/web/20240627102854/https://www.geeksforgeeks.org/snap-package-manager-on-ubuntu/
Open In App

Snap Package Manager on Ubuntu

Last Updated : 10 Jun, 2024
Improve
Improve
Like Article
Like
Save
Share
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.

Linux Snap – FAQs

What is a Snap in Linux?

A Snap is a self-contained software package that works across various Linux distributions, developed by Canonical.

Is Snap better than APT in Linux?

Snap provides easier management and dependency handling but can be slower and larger compared to APT packages.

Which Linux distros use Snap?

Ubuntu, Debian, Fedora, Manjaro, and many other Linux distributions support Snap.

Do snap runs as root?

By default snap expects the root privileges to install the snap packages to your system.

What is the Snap command used for?

The `snap` command is used to install, update, and manage Snap packages on a Linux system.



Similar Reads

How to Install and Configure Synaptic Package Manager in Ubuntu?
Synaptic Package Manager is a GUI based package management tool that uses APT (Advanced Package Tool) to installing, updating or removing packages from the Linux system. Some of the feature given by Synaptic Package Manager are: Allow installing, updating or removing packagesUpgrading whole systemSearching and filtering the list of packages availab
1 min read
Using Synaptic Package Manager to Download a Package in Linux
Synaptic package manager is GTK-based graphical user interface based on Advanced Package Tool, or APT for download or removes packages on Debian based system like Ubuntu. We can download packages by using the apt command, but the GUI interface is always user-friendly and easy to use. To install synaptic package manager run the following command on
3 min read
Neofetch In Linux – Snap cool screenshots of your Linux
Neofetch is a fancy, highly customizable, and aesthetic command-line system information screenshot utility tool. Written in the Bash scripting language, it works inside a terminal window, on triggering up the command it by default displays the operating system, software, and hardware of your system on the right side of the column alongside an ASCII
4 min read
How to Change Default Display Manager in Ubuntu
Linux Desktop systems have a default display manager responsible for user authentication and loading the desktop environment. When we will boot our Linux system the display manager will show a login screen. On successful authentication, it loads the desktop environment of that user. It also controls user sessions. Display Manager is also known as L
3 min read
sysget - Front-End For Every Package Manager in Linux
There are lots of package managers for various Linux distros, for example, apt (Ubuntu), yum (legacy Fedora), dnf (Fedora) but remembering them all is quite a headache. So for that reason, there is a utility called sysget, which is a front-end for every package manager in Unix-like operating systems. So that you don't need to learn about every pack
2 min read
How to Uninstall Packages With Apt Package Manager in Linux
The apt command is a sophisticated command-line tool that interacts with Ubuntu's Advanced Packaging Tool (APT) to execute tasks including installing new software packages, updating the package list index, and even upgrading the whole Ubuntu system. Along with this, we can uninstall or remove the downloaded packages from the system. So in this arti
2 min read
Nix - The Purely Functional Package Manager for Linux
Nix is a purely functional package manager for Linux, that serves to provide a purely functional approach to any system's software package management. Due to its functional and declarative approach, it is lauded for its capacity to: Support the installation of multiple versions of a given package.Enable atomic upgrades and rollbacks of a given pack
5 min read
How to Install a New Package Manager in Linux
Linux offers several package managers for software installation, updates, and maintenance. In Linux, every distribution comes with a package manager by default. The Debian distribution comes with APT(Advanced Package Tool), Red Hat, and its derivatives such as CentOS and Fedora use YUM package management.However, there may be cases when you need to
4 min read
What is Fedora's DNF package manager and how to use it?
A package manager is a program that helps you to manage and install and manage apps and their dependencies on a system. While Debian-based systems have dpkg and APT as their package managers and Arch-based systems have Pacman, Fedora-based systems use DNF. What is DNF?DNF or Dandified YUM is the package manager of Fedora and Fedora derivatives and
5 min read
How to Install apt-listchanges package on Ubuntu?
Upon collecting the appropriate items from the Debian changelog and NEWS files, the utility apt-listchanges may compare a new version of a package with the one presently installed and display what has changed. It may be run on multiple.deb archives at once to get a list of all changes that would result from installing or updating a set of packages.
3 min read