install snap in linux code example

Example 1: ubuntu install snap

sudo apt update
sudo apt install snapd

Example 2: install snap on linux redhat

sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"
sudo yum update
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

Example 3: install snap linux

On Linux Mint 20, /etc/apt/preferences.d/nosnap.pref needs to be removed before Snap can be installed. This can be accomplished from the command line:

sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update

To install snap from the Software Manager application, search for snapd and click Install.
Alternatively, snapd can be installed from the command line:


sudo apt install snapd

Either restart your machine, or log out and in again, to complete the installation.

Install Snap Store
To install Snap Store, simply use the following command:

sudo snap install snap-store