How To Install Snap on Ubuntu 22.04 LTS
In this tutorial, we will show you how to install Snap on Ubuntu 22.04 LTS. For those of you who didn’t know, Snap is a package management system that simplifies the installation and maintenance of software on Linux systems. Unlike traditional package managers like apt, which rely on system libraries and dependencies, Snap packages are self-contained. This means that each Snap includes all the libraries and dependencies it needs to run, reducing the risk of conflicts and making it easier to manage software.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the Snap package manager on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint.
Prerequisites
- A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Snap on Ubuntu 22.04 LTS Jammy Jellyfish
Step 1. Before installing any new software, it’s a good practice to update the package list to ensure you have the latest package information. Open the terminal and run the following command:
sudo apt update sudo apt upgrade
Step 2. Installing Snap on Ubuntu 22.04.
Ubuntu 22.04 LTS comes with Snap pre-installed. To check if Snap is already installed, open a terminal and run the following command:
snap version
If Snap is installed, you will see output similar to this:
snap 2.54.3 snapd 2.54.3 series 16 ubuntu 22.04 kernel 5.15.0-25-generic
If Snap is not installed, you will receive an error message. In that case, proceed to the next section to install Snap. Install it via the terminal:
sudo apt install snapd
After the installation is complete, you can verify that Snap is installed correctly by running the following command:
snap version
After the installation is complete, it’s recommended to restart your system or log out and log back in. This ensures that the Snap paths are updated and the system recognizes the newly installed package manager.
Step 3. Using Snap on Ubuntu.
You can install any package available in the Snap repository with the following command below:
snap install [package-name]
For example, install the Atom text editor on Ubuntu 22.04 using Snap Package Management Software. run the following command below:
sudo snap install atom --classic
To see a list of all Snap installed on your system, enter the following:
snap list
Output:
Name Version Rev Tracking Publisher Notes bare 1.0 5 latest/stable canonical✓ base core18 20220309 2344 latest/stable canonical✓ base core20 20220318 1405 latest/stable canonical✓ base firefox 99.0.1-1 1232 latest/stable/… mozilla✓ - gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 161 latest/stable canonical✓ - gnome-3-38-2004 0+git.1f9014a 99 latest/stable/… canonical✓ - gtk-common-themes 0.1-79-ga83e90c 1534 latest/stable/… canonical✓ - snap-store 41.3-59-gf884f48 575 latest/stable/… canonical✓ - snapd 2.55.3 15534 latest/stable canonical✓
To remove an installed snap, use the following command:
sudo snap remove [package-name]
The help command allows seeing command options to use with Snap:
snap --help
Congratulations! You have successfully installed Snap. Thanks for using this tutorial for installing the Snap package manager on Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the official Snap website.