How to Install and Utilize Snap on Ubuntu

Try this guide with our instant dedicated server for as low as 40 Euros

install snap

Snap is a software packaging and deployment utility created by Canonical specifically designed for Linux platforms.

Snaps are self-contained packages that include all necessary libraries and dependencies. They are compatible with various Linux distributions, serving as a distribution-independent method for deploying software upstream. In most distributions, especially Ubuntu, the snapd service runs in the background, enabling you to administer snaps on your machine.

If you don’t have Snap on your Linux machine, you can easily install it in a few commands. 

In this tutorial, we will look into the steps involved in installing Snap on your Ubuntu system. Next, we will look into how you can use Snap to manage packages on your system. 

However, before that, let’s take a quick look at the prerequisites for the process.

Table Of Contents

  1. The Prerequisites
  2. Setting Up Snap on Ubuntu
    1. Install Snap on Ubuntu
    2. How to Set Up the Snap Store on Ubuntu
  3. How To Use Snap
    1. Install a Snap Package via the Terminal
    2. Search for Snap Packages
    3. List Installed Snap Packages
    4. Run Installed Snap Packages
    5. Remove Installed Snap Packages
  4. Conclusion
  5. FAQs

The Prerequisites

  • A system running a recent stable Ubuntu version
  • A user account with sudo or root permissions

Setting Up Snap on Ubuntu 

Snap typically comes pre-installed on most modern versions of Ubuntu.

You can easily check if Snap is installed on your system by typing snap version in the terminal. This command will display details such as the version of the Snap tool, the snapd daemon, your Linux distribution’s name and version, the software series, and the kernel version.

# snap version

snap version

Install Snap on Ubuntu

If Snap is not already installed on your machine, you can easily install it via the terminal.

Start by refreshing your machine’s package list with the following command:

# sudo apt update

Next, install Snap by executing the following command:

# sudo apt install snapd

How to Set Up the Snap Store on Ubuntu

The Snap Store provides a graphical interface for discovering, installing, and managing snaps on Linux systems. This is a great choice for novice users who want to point and click while installing or removing Snap packages. 

Usually, you can use the following command to install the Snap Store on your system:

# sudo snap install snap-store

sudo snap install snap-store

Once the installation is complete, you can open the Snap Store by typing this command in the terminal:

# snap-store

How To Use Snap

Now that you have installed Snap and Snap store on your machine, you can use them to search, install, and remove snap packages. 

You can opt for the Snap Store for a graphical interface (GUI) approach or the terminal for command-line installation.

Install a Snap Package via the Terminal

To install a Snap app through the terminal, use this command:

# sudo snap install [package name]

Allow the installation process to complete.

sudo snap install opera

Search for Snap Packages

To explore available snap packages, use the following command:

# snap find

For instance, if you want to find a web browser, you would enter:

snap find browser

The results will display a list of apps associated with the term browser.

snap find browser

List Installed Snap Packages

We recommend using the following command to view all snap packages installed on your system:

# snap list

This command outputs details such as the package name, version, revision, and publisher.

snap list

Run Installed Snap Packages

To execute the snap that we installed earlier, simply enter the app name in the terminal:

# <package_name>

For example, to start the Opera browser, type opera in the terminal.

Remove Installed Snap Packages

To uninstall a snap, execute the following command:

# sudo snap remove <package>

This command deletes the application code, any related services, runtime dependencies, and all associated user data.

sudo snap remove opera

Conclusion

Using Snap on your system provides a flexible, secure way to manage and deploy applications across various Linux distributions. Whether you’re using the GUI of the Snap Store or the efficiency of the terminal, Snap simplifies software installation and management. 

FAQs

Q. How do I install Snap on my Linux distribution?

To install Snap on distributions other than Ubuntu (where it is often pre-installed), you can generally use your package manager. For example, on Debian, you would use sudo apt install snapd, and on Fedora, sudo dnf install snapd.

Q. How do I find and install applications using Snap?

You can find and install Snap apps using the Snap Store or via the ssh. To find an application, use snap find <search_query>. To install a Snap, use sudo snap install <package_name>.

Q. Can Snap packages be updated automatically?

Yes, Snap packages receive automatic updates by default. The Snap system checks for updates several times a day and applies them automatically in the background.

Q. How can I see which Snap packages are installed on my system?

To list all Snap packages installed on your system, use the command snap list. This will show you the package names, versions, and other details.

Q. How do I remove a Snap package?

To remove a Snap package, use the command sudo snap remove <package_name>. This command deletes the application along with its associated data and dependencies.

Q. Are Snap packages secure?

Yes, Snap packages are designed with security in mind. They are sandboxed and isolated from the rest of the system, which minimizes the risk of security vulnerabilities affecting the system as a whole.

Q. Can I use Snap without an internet connection?

While you need an internet connection to download and install Snaps, once installed, most Snaps can be used without an internet connection unless the specific application requires it.

Q. Is there a graphical interface to manage Snap packages?

Yes, the Snap Store provides a graphical interface where you can browse, install, and manage Snap packages. It can be installed with the command sudo snap install snap-store.

Try this guide with our instant dedicated server for as low as 40 Euros