Kiến Thức Linux

How to Install Snap on Ubuntu

Introduction

Snap is a tool developed by Canonical for the purpose of package management and software deployment on Linux.

Snaps are packaged applications compiled with libraries and dependencies. Snaps work across a range of Linux distributions, which makes them a distro-agnostic upstream software deployment solution. The snapd daemon is a background service that allows you to manage the snaps on your system.

This tutorial explains how to install and use Snap on Ubuntu.

Prerequisites

  • An Ubuntu system
  • Access to the command line
  • A user account with sudo or root privileges

Note: Learn how the Snap packaging system compares to the APT package manager in Snap vs. APT.

How to Install Snap on Ubuntu

Snap is already installed and available for use on the majority of the latest Ubuntu distributions.

Enter snap version in the terminal to check if you have Snap installed on your system.

This lists the version of the Snap tool, the snapd daemon, the software series number, the name and release of your Linux distribution, as well as the kernel version.

Checking if Snap is installed.

If you do not have Snap preinstalled, install it via the terminal.

1. Start by updating packages:

sudo apt update

2. Enter the following command:

sudo apt install snapd

How to Install Snap Store on Ubuntu

The Snap Store is a GUI application for finding, installing and managing snaps on Linux.

1. Install the Snap Store using the command below:

sudo snap install snap-store
How to install the snap store.

2. Wait until the download completes and launch it by entering:

snap-store

Note: The Snap Store runs on GNOME and it works best on GTK Ubuntu desktop environments. To err on the safe side and take full advantage of the Snap Store, install a Linux desktop environment that uses GTK, such as GNOME, Mate, or Cinnamon.

Using Snap

To use a snap package on your system, you need to install it first. Use the Snap Store if you prefer the GUI method, or use the terminal.

To install a snap app via the terminal, enter the following command:

sudo snap install [package name] 

Wait for the installation to finish.

Installing a snap package via terminal.

Search for Snaps

To browse through available snap packages, use the following:

snap find 

For example, to search for a web browser, enter:

snap find browser
Finding a specific snap package.

The output shows a list of apps related to the keyword ‘browser’.

List Installed Snaps

To see a list of all snaps installed on your system, enter the following:

snap list
The command to list snap packages.

The output shows snap details such as package name, version, revision, and the publisher.

Run Installed Snaps

Run installed snaps from the terminal by entering the app name:

<package_name>

For example, to open the Opera web browser type opera in the terminal and the app launches.

Remove Installed Snaps

To remove an installed snap, use the following command:

sudo snap remove <package>
removing a snap package on ubuntu

The snap remove command removes the application code and any services previously declared by the app. The command also cleans up the app’s runtime dependencies and all associated user data.

Note: For more options on using snap packages, visit our article A Comprehensive Guide To Using Snap Packages On Ubuntu.

Conclusion

After reading this tutorial, you should know how to install Snap on Ubuntu and work with Snap packages.

Đăng ký liền tay Nhận Ngay Bài Mới

Subscribe ngay

Cám ơn bạn đã đăng ký !

Lỗi đăng ký !

Add Comment

Click here to post a comment

Đăng ký liền tay
Nhận Ngay Bài Mới

Subscribe ngay

Cám ơn bạn đã đăng ký !

Lỗi đăng ký !