Cyberithub

5 Best Steps to Install Snap command on Ubuntu 20.04

Advertisements

In this article, I will take you through 5 Best Steps to Install Snap command on Ubuntu 20.04. Snap is actually a terminal based client tool that talks with snapd daemon to manage snaps on Linux based systems. All the snaps are usually stored in a central repository called Snap Store from where snaps can be downloaded and installed using snap command. All the commands run by the snap client utility are listened through snapd daemon service which is like any other daemon service that runs on a Linux Server. More on Snapcraft docs.

5 Best Steps to Install Snap command on Ubuntu 20.04

Best Steps to Install Snap Command on Ubuntu 20.04

Also Read: 36 Popular Snap command Examples in Linux for Beginners

Advertisements

Step 1: Prerequisites

a) You should have a running Ubuntu 20.04 Server.

b) You should have sudo or root access to run privileged commands.

Advertisements

c) You should have apt-get utility installed in your Server.

Step 2: Update Your Server

First update all the Installed packages by using apt-get update command as displayed below.

Advertisements
root@localhost:~# apt-get update
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 https://packages.microsoft.com/repos/edge stable InRelease [7,343 B]
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:6 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease [17.5 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [490 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,031 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [229 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [13.5 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [272 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [39.5 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [576 kB]
Get:15 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [781 kB]
Get:16 http://in.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [170 kB]
Get:17 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [330 kB]

 

Step 3: Install Snap Command

Then in the next step, install snap utility using apt-get install snapd command as shown below. So installing snapd package will install both snap client utility and snapd daemon.

root@localhost:~# apt-get install snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libatomic1
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
snapd
0 upgraded, 1 newly installed, 0 to remove and 145 not upgraded.
Need to get 30.6 MB of archives.
After this operation, 134 MB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 snapd amd64 2.49.2+20.04 [30.6 MB]
Fetched 30.6 MB in 10s (3,151 kB/s)
Selecting previously unselected package snapd.
(Reading database ... 188147 files and directories currently installed.)
Preparing to unpack .../snapd_2.49.2+20.04_amd64.deb ...
Unpacking snapd (2.49.2+20.04) ...
Setting up snapd (2.49.2+20.04) ...
Installing new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine.real ...
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...

 

Step 4: Check Snap Version

After successful installation of snap command, you can check its installed version by using snap --version command. From here you can see that both snap and snapd are of the same version 2.50.1.

Advertisements
root@localhost:~# snap --version
snap 2.50.1
snapd 2.50.1
series 16
ubuntu 20.04
kernel 5.8.0-55-generic

 

Step 5: Uninstall Snap command

Once you are done with the snap utility, you can also uninstall it by using apt-get remove snapd command as shown below.

root@localhost:~# apt-get remove snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libatomic1
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
chromium-browser snapd
0 upgraded, 0 newly installed, 2 to remove and 145 not upgraded.
After this operation, 126 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 188241 files and directories currently installed.)
Removing chromium-browser (1:85.0.4183.83-0ubuntu0.20.04.2) ...
Removing snapd (2.48.3+20.04) ...
Stopping snap.lxd.activate.service
Stopping unit snap.lxd.activate.service

2 thoughts on “5 Best Steps to Install Snap command on Ubuntu 20.04”

Leave a Comment