Ubuntu 20.04 “Focal Fossa” is now officially available for installation. This new operating system Includes a new desktop theme and dark mode.
But on the inside, there is an updated Linux Kernal and a new method of installing applications.
In Ubuntu 20.04, the Software Centre is replaced by new Snap-based applications. And, we’ll explain what Snaps on Ubuntu 20.04 really means for you.
Let’s Get Started…
What is a Snap Package on Linux?
Snap is basically a snap command as well as a snap installation file. The Snap bundle includes an application with all its required dependencies into a single compressed file. These dependencies may vary from library files to web database servers or anything that may be required to run and launch the application.
The major benefits of the Snaps are that you don’t have to search and manually install all the dependencies an application requires. This makes the installation process much simpler.
Sometimes, when you install an application and it doesn’t run because the required resources are not available or due to an outdated prerequisite, or its installation overwrites files required by existing applications.
Now with Snap, the installation files are compressed and are extracted at the time of installation. Also, its only at the time of installation that snaps are mounted to a Loop Device. This allows the file to be accessed by the system.
In Snap, the Installations proceed in a fenced manner, so that the file can’t interfere with the existing files on the system. Due to this, you can install multiple versions of the same application on a single system.
The drawback of the snaps installation package is that its file size will be bigger than the normal Debian package manager (DEB) files. Also, they will use much more hard drive space.
Let us explain…
With Snaps, every application installs its own copy of the set of required resources and creates a mini-container to avoid interface with other applications on the system. This isn’t the most efficient way of Installing an application.
Also with Snaps, application loading time has increased which means slow application launches.
How to install Snap Store on Ubuntu 20.04?
Now, if you have freshly download and installed Ubuntu 20.04, the Snap Store will be a part of your system. But if you have upgraded to ubuntu 20.04 from any other version, then you have to manually install the Snap Store.
1. To Install Snap Store, open a new terminal, and enter the following command.
$ sudo snap install snap-store
2. Once the installation is complete, you can open the Snap store from the application menu or you can type the following command on the terminal window.
You can also check the installed Snap Store version by using the following command.
$ snap version
How to install Snap Packages
Installing an application with a Snap package is really easy. Also, you can use the Snap command to search for applications and later install the desired one.
For example, we are going to install the gimp image editor. But first, let’s search it.
$ snap find gimp
Now, the snap will find all the package name related to gimp and show us all the finding that matches with or related with the searched term.
To install the package of your need, use the value from the name column and type the following command
$ sudo snap install gimp
The package will begin to download and a progress bar will be displayed from the left of the terminal window. When the installation is finished, a confirmation text will appear on the next line.
Now, you can use the df command to check the disk space usage of the different file systems present on the computer. And if we use its output with pipe along with grep command and search for gimp, we get the disk usage of this specific application.
$ df | grep gimp
This is showing that the snap package was mounted and the mounting location of the snap directory is- /snap/gimp/252. Here, 252 refers to the release number of this gimp version.
The file system listed here is: /dev/loop18. Loop Device files are used to make a block device to access regular files. Loop devices are used to mount file systems in disk images. In our case, it is mounting the SquashFS file system in a snap package. And the “18” here means this is the 18th /dev/loop device file on this computer.
Now, we’ll use the df command with the –t (type) option to limit the output to SquashFS file types only.
$ df -t squashfs
Now, the mounted SquashFS file will be listed on the terminal window, and it will show all the /dev/loop device files in use on this computer.
Each of the File System is mounted within the snap directory. And, this doesn’t show the different snap packages installed on this computer. These are the some which we have manually installed but there are some snap packages that are installed right out of the box.
To get the list of all the Snap packages, you can use the snap list command in the terminal window.
$ snap list
Here’s the full list:
Name Version Rev Tracking Publisher Notes core 16-2.44.1 8689 stable canonical* core core18 20200124 1668 stable canonical* base gimp 2.10.18 252 stable snapcrafters - gnome-3-26-1604 184.108.40.20691114 98 stable/… canonical* - gnome-3-28-1804 3.28.0-16-g27c9498.27c9498 116 stable canonical* - gnome-calculator 3.34.1+git1.d34dc842 544 stable/… canonical* - gnome-characters v3.32.1+git3.b9120df 399 stable/… canonical* - gnome-logs 3.34.0 81 stable/… canonical* - gnome-system-monitor 3.32.1-3-g0ea89b4922 127 stable/… canonical* - gtk-common-themes 0.1-28-g1503258 1440 stable/… canonical* -
Now, you can see that only 10 snap packages are currently installed on this Linux computer. And these 10 snap packages have resulted in the 18 SquashFS file systems.
What do all these table columns mean?
- Name: The name of the Installed Snap Package.
- Version: The version number of the Installed Snap Package.
- Rev: The revision number of the Installed Snap Package.
- Tracking: This shows the snap channel and checks for updates.
- Publisher: The Name of the organization or the developer who published that snap package. If it is a verified publisher a green tick mark or an asterisk (*) will be shown beside publisher name.
- Notes: Any other comments or additional information regarding the package.
Snap Channels on Ubuntu 20.04
As we know there are four types of Snap Channels and we can use the info command to get the description of the snap channel.
$ snap info gtk-common-themes
Now, we’ll see the package tracking and the versions of the snaps package in all of its four channels.
A snap package checks for the newer version of the software four times per day from the channel it is tracking. You can change the snap package track by using the refresh and channel options.
Type the following command in the terminal:
$ sudo snap refresh gtk-common-themes --channel=beta
Now, if a newer version of the application was present, it will be installed. And also the tracking channel has been changed to beta. The beta package will be automatically downloaded and installed for this application as soon as the update is available.
However, you can also you the –list command to check for any updates present for your snap packages installed on your Linux computer.
Use the following command to do so,
$ sudo snap refresh --list
This command will notify you about the newer versions of the snap packages currently installed.
You can also force a particular application to check for updates by the following command.
$ sudo snap refresh gtk-common-themes
How to Remove a Snap Package?
Now, if you want to remove a specific package, you can use the remove command as shown below:
$ sudo snap remove gimp
- Chrome Flags in 2020: The Definitive Guide to Enhance Browsing
- How to Install Chrome OS on Your PC in 2020!
- MIUI 12 Features: Top 8 New Features You Should Know!
The Snap Guide Sheet for Ubuntu 20.04
Here is the list of Snap command which will help you with the Snap packages.
|snap find package_name||Search for a package|
|sudo snap install package_name||Install a package|
|snap list||See all installed packages|
|snap info package_name||Get information about a single package|
|sudo snap refresh package_name –channel=channel_name||Change the channel of a package|
|sudo snap refresh –list||Check for updates for any installed package|
|sudo snap refresh package_name||Check for updates for any specific package|
|sudo snap remove package_name||Uninstall a package|
Should You use Snaps on your Linux Computer!
Now, If you don’t care about the type of application you’re using on your computer. Then, you can use snaps.
Also, there are quite some drawbacks to snaps which you should consider before making any decisions.
- Snaps are Slower to load, especially on old computers.
- Snap will use more hard drive space.
- Snap gets updated automatically.
- Snaps might not match with your installed theme.
- Snaps are not always official packages.
If you have a modern and faster computer, then snap loading timing will not bother you at all. The main time sanction can be seen while installing the application. Also, due to the large size, they will take more time to download. But downloading and installing is a one day task, so should not matter much.
So, this was our Guide on Snaps on Ubuntu 20.04. If you have any problems related to this topic, then comment down below and we will get back to you.