Как установить snap в linux mint
Перейти к содержимому

Как установить snap в linux mint

  • автор:

Snap Store¶

The Snap Store, also known as the Ubuntu Store , is a commercial centralized software store operated by Canonical.

Similar to AppImage or Flatpak the Snap Store is able to provide up to date software no matter what version of Linux you are running and how old your libraries are.

Criticism¶

Centralized control¶

Anyone can create APT repositories and distribute software freely. Users can point to multiple repositories and define priorities. Thanks to the way APT works, if a bug isn’t fixed upstream, Debian can fix it with a patch. If Debian doesn’t, Ubuntu can. If Ubuntu doesn’t Linux Mint can. If Linux Mint doesn’t, anyone can, and not only can they fix it, they can distribute it with a PPA.

Flatpak isn’t as flexible. Still, anyone can distribute their own Flatpaks. If Flathub decides they don’t want to do this or that, anyone else can create another Flatpak repository. Flatpak itself can point to multiple sources and doesn’t depend on Flathub.

Although it is open-source, Snap on the other hand, only works with the Ubuntu Store. Nobody knows how to make a Snap Store and nobody can. The Snap client is designed to work with only one source, following a protocol which isn’t open, and using only one authentication system. Snapd is nothing on its own, it can only work with the Ubuntu Store.

This is a store we can’t audit, which contains software nobody can patch. If we can’t fix or modify software, open-source or not, it provides the same limitations as proprietary software.

Backdoor via APT¶

When Snap was introduced Canonical promised it would never replace APT. This promise was broken. Some APT packages in the Ubuntu repositories not only install snap as a dependency but also run snap commands as root without your knowledge or consent and connect your computer to the remote proprietary store operated by Canonical.

Disabled Snap Store in Linux Mint 20¶

Following the decision made by Canonical to replace parts of APT with Snap and have the Ubuntu Store install itself without users knowledge or consent, the Snap Store is forbidden to be installed by APT in Linux Mint 20.

For more information read the announcements made in May 2020 and June 2019.

How to install the Snap Store in Linux Mint 20¶

Recommended or not, if you want to use the Snap Store, re-enabling and installing it is very easy.

Installing snap on Linux Mint

Snap is available for the latest release of Linux Mint, 21.1 (Vera), and for older releases from Linux Mint 18.2 (Sonya) onwards.

You can find out which version of Linux Mint you’re running by opening System info from the Preferences menu.

Linux Mint 21 system info page

From Linux Mint 20 onwards, a file called nosnap.pref needs to be either moved or removed from /etc/apt/preferences.d/ before Snap can be installed.

This can be accomplished from the command line, and the following command (for example) moves nosnap.pref to a renamed nosnap.backup file in your Documents directory:

With the file removed from its original location, the package database needs to be updated next:

To now install snap from the Software Manager application, search for snapd and click Install.

Alternatively, snapd can be installed from the command line:

To complete the installation, either restart your machine, or log out and in again.

To test your system, install the hello-world snap and make sure it runs correctly:

Snap is now installed and ready to go! If you’re using a desktop, a great next step is to install the Snap Store app.

Last updated 4 months ago.

© 2023 Canonical Ltd.
Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Powered by Charmed Kubernetes

How to Enable Snap on Linux Mint 21

In the Linux system, snap is the cross-distribution application manager containing a bundle of applications with their respective dependencies. This easy-to-install application deployment system for Linux users is explored by Canonical.

Installing packages from the snap store is quite easy as they are installed with the source code, libraries, and dependencies and update the package automatically.

The service used to handle and manage snaps at the backend is called snap daemon or is represented as snapd. It’s a snap package manager that is used to install applications from the snap store and manage them.

How to Enable Snap Packages on Linux Mint 21

To enable snap packages on Linux Mint 21 system, you need to perform a few steps carefully:

Step 1: In the first step, you are required to delete the nosnap.pref file from the system. It would be done by executing the following command in the terminal:

Step 2: After removing the file, update the system repository to upgrade all the packages with the help of the given command:

Step 3: Now, install the snap daemon on Linux Mint 21 system to manage and handle snap packages. Execute the command mentioned below to get snap daemon:

Step 4: After the installation of snapd, start it using the given command:

Step 5: In the next command you would be able to enable snapd, so that in the boot time, it starts automatically on the system:

Step 6: Run the following command to check the successful installation of Snap on Linux Mint 21 system:

Install Snap Packages on Linux Mint 21

We can now install any package from the snap repository after installing snap on the Linux Mint system. But make sure that the application is available on the snap store.

You can get a list of applications offered by snap store from its official site:

To install the application from the snap store, the following syntax should be followed:

For example, if we want to install mailspring on our Linux system, run the command given below on terminal:

How to Remove Snap Package from Linux Mint 21

To remove the specific package from Linux Mint system, follow the mentioned syntax:

To remove mailspring snap from the system, type in terminal:

How to Remove snapd from Linux Mint 21

If you want to delete snapd package manager from the system, the following command would be executed:

Conclusion

Snap is the package deployment system that contains bundles of applications in its store. When installing packages using snaps, they download with the source code, libraries, and relative dependencies. Snap is a free, easy-to-install cross-distribution application manager famous among Linux users. There is a service used to handle and maintain snaps called snap daemon which is represented as snapd.

This article has briefly described how to enable snap packages on Linux Mint 21 system. We have mentioned a step-by-step procedure with an example and how we can remove snaps from the Linux Mint system.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.

How to Install and Enable Snap on Linux Mint 21/20

While Linux Mint doesn’t ship with snapd preinstalled, having Flatpak installed is usually enough for most users. Some may wish to enable Snap and still use the system that Linux Mint provides. For those interested in doing this, this tutorial will cover everything you need to know to turn on Snap and ensure it’s running correctly.

Table of Contents

Remove Snap Block (nosnap.pref)

Linux Mint allows users to add additional APT preferences when installing packages. By default, this preferences.d directory contains a configuration file named nosnap.pref, which provides instructions that prevent APT from automatically installing snaps with selected packages.

To remove the nosnap.pref file, run the following command.

Alternatively, you can rename the file as a backup if you wish to restore it.

Now update your Linux Mint system packages cache list by running an apt update.

Install Snapd (Snapcraft service)

Now that you have removed the block preventing Snap from being installed. You can run through the following steps, which will install Snap.

This command will install the Snap package manager and all the necessary dependencies.

After the installation is complete, you can verify that Snap is working by running:

You should see the version number of the Snap package manager you installed.

Before proceeding any further, enable the Snap service immediately and automatically on system reboot using the following command. Note that this may already be set, but it is always ideal for running the command to ensure it is set.

Optionally, you can check the systemctl status using the following command.

snapd service systemctl status ok on linux mint 21 or 20

I would also advise installing the Snap core system package, which is optional.

Optionally, you can reboot, but this can be skipped; if you notice any issues, I would advise doing this.

Now test that the Snap service is working using the following command.

The output should be “Hello World!” which means the Snap service is working and installed correctly.

How to Install Snap Packages

Now that you have enabled Snap, the command to install packages is as follows.

Example installing Telegram.

If you want to install the Snap (Snapcraft) GUI store, run the following command.

To launch Snap Store, this can be found in the following path Taskbar > Administration > Snap Store .

launch snap store example on linux mint 21 or 20

Remove Snap and Restore nosnap.pref

One of the best things I can say about Snap, if you want to remove all Snap installations and the package manager itself, you do not need to go through each installation and remove them one by one. All you need to do is remove the snapd service, which, during removal, will uninstall all installed snap packages.

example removing snapd removes all installed snaps on linux mint 21 or 20

In the above example, you can see in the output that Snap packages installed, for the case of the tutorial, Snap Store and HelloWorld were automatically removed in the cleanup. If you have installed 100 Snap applications, you do not need to remove these before from Snap itself.

Now, you can restore the block if you rename the original block file to nosnap.pref.backup, convert the file to its original name using the mv command.

Alternatively, if you deleted the file, use the following command that will automatically create a new block file.

Conclusion

In this small tutorial, you have learned how to remove the block preventing Snap from being installed, install the application, and learn some essential functions of using it, along with how to remove and restore the Snap block if required. Overall, I believe you would only install Snaps if you are an avid user of them and ported from Ubuntu or it contains better-supported software you cannot get quickly on the default APT repository, Flatpak, or a third-party repository such as LaunchPAD PPA’s, etc.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *