How to Install and Use Snap Package Manager on Alma Linux 8
The Snap package manager also called snapd is a modern package manager in Linux that allows you to install Snap packages across a wide range of Linux distributions and versions. Snap packages are self-contained and run in a sandbox environment. You can install Snap packages via command-line or download them from the website as a .snap file. Snap is a universal, cross-distribution, and dependency-free package manager. Snap applications packaged with all their dependencies to run on all major Linux distributions.
In this tutorial, I will show you how to install and use the Snap Package Manager on Alma Linux 8.
Prerequisites
- A server running Alma Linux 8.
- A root password is configured on the server.
Install Snapd
By default, the Snapd package is not included in the Alma Linux 8 default repo. So you will need to install it from the EPEL repo.
First, install the EPEL repo using the following command:
dnf install epel-release -y
Next, run the following command to install the Snapd package to your system.
dnf install snapd -y
Once the Snapd is installed, start and enable the Snapd service using the following command:
systemctl enable --now snapd.socket
systemctl start --now snapd.socket
You can check the status of the Snapd service with the following command:
systemctl status snapd.socket
You will get the following output:
? snapd.socket - Socket activation for snappy daemon Loaded: loaded (/usr/lib/systemd/system/snapd.socket; enabled; vendor preset: disabled) Active: active (listening) since Mon 2022-02-28 10:30:21 UTC; 10s ago Listen: /run/snapd.socket (Stream) /run/snapd-snap.socket (Stream) Tasks: 0 (limit: 11412) Memory: 4.0K CGroup: /system.slice/snapd.socket Feb 28 10:30:21 linux systemd[1]: Starting Socket activation for snappy daemon. Feb 28 10:30:21 linux systemd[1]: Listening on Socket activation for snappy daemon.
To check the Snapd version, run the following command:
snap version
You will get the following output:
snap 2.54.3-1.el8 snapd 2.54.3-1.el8 series 16 rocky 8.5 kernel 4.18.0-348.12.2.el8_5.x86_64
Find a Package with Snap
Snap provides an easier way to find your desired package from the Snap repository.
To list all Snap packages available on the Snap repository, run the following command:
snap find
You will get a list of all Snap packages in the following output:
Name Version Publisher Notes Summary spotify 1.1.77.643.g3c4c6fc6 spotify* - Music for everyone gimp 2.10.28 snapcrafters - GNU Image Manipulation Program 1password 8.5.0 1password* - 1Password - Password Manager and Secure Wallet code f80445ac vscode* classic Code editing. Redefined. vlc 3.0.16 videolan* - The ultimate media player okular 20.12.3 kde* - Document Viewer onlyoffice-desktopeditors 7.0.0 onlyoffice* - A comprehensive office suite for editing documents, spreadsheets and presentations liveforspeed S3-6T mmtrt - Live for Speed (LFS) is a online racing simulator. bomber 21.12.2 kde* - Arcade Bombing Game thunderbird 91.6.1 canonical* - Mozilla Thunderbird email application phpstorm 2021.3.2 jetbrains* classic PhpStorm signal-desktop 5.30.0 snapcrafters - Signal Desktop climate-trail 2.1 merlijn-sebrechts - Surviving The Climate Apocalypse gitkraken 8.2.1 gitkraken* classic For repo management, in-app code editing & issue tracking. krita 4.4.5 krita* - Digital Painting, Creative Freedom vidcutter 6.0.5.1 ozmartian - the simplest + fastest media cutter and joiner scummvm 2.5.1 snapcrafters - ScummVM is a program which allows you to run numerous classic graphical point-and-click adventure games and role-playing games bitwarden 1.31.3 bitwarden* - Bitwarden pinta 2.0.2 james-carroll - Painting made simple! typora 1.1.5 typora - A minimal Markdown reading and writing app picard 2.7.3 metabrainz-apps - Picard is the official MusicBrainz audio tagger jami 20211222.1.3e5b149 sfljami - Jami, a secure, distributed communication software and SIP client brave 1.35.103 brave - Browse faster and safer with Brave. konversation 21.12.1 kde* - IRC client omniawrite 1.3.2 torsten.dittmann - OmniaWrite - A text editor engineered for creative writing. opera 84.0.4316.21 opera-software* - Fast, secure, easy-to-use browser plexmediaserver 1.25.6.5577-c8bd13540 plexinc* - Your media on all your devices. powershell 7.2.1 microsoft-powershell* classic PowerShell for every system!
To find a specific package, run the following command:
snap find vlc
This will find the VLC package and other similar packages as shown below:
Name Version Publisher Notes Summary vlc 3.0.16 videolan* - The ultimate media player mjpg-streamer 2.0 ogra - UVC webcam streaming tool audio-recorder 3.0.5+rev1432+pkg-7b07 brlin - A free audio-recorder for Linux (EXTREMELY BUGGY) dav1d 0.9.2 videolan* - AV1 decoder from VideoLAN gridplayer 0.2.1 vzhd1701 - Play videos side-by-side orion-desktop 0.0.10 keshavnrj - Complete torrent client and streamer for Linux Desktop kycli 0+git.9591d6e dvlc - The command line interface to the unofficialKYC platform. peerflix v0.39.0+git1.df28e20 pmagill - Streaming torrent client for Node.js test-streamlink 1.4.1-64-g599f362e addq1eax - test-Streamlink
Install a package with Snap
To install a specific package, run the following command:
snap install vlc
This will install the VLC package into your system.
To verify the information about the VLC package, run the following command:
snap info vlc
You should see the following information:
name: vlc summary: The ultimate media player publisher: VideoLAN* store-url: https://snapcraft.io/vlc contact: https://www.videolan.org/support/ license: unset description: | VLC is the VideoLAN project's media player. Completely open source and privacy-friendly, it plays every multimedia file and streams. It notably plays MKV, MP4, MPEG, MPEG-2, MPEG-4, DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3, Ogg/Vorbis files, BluRays, DVDs, VCDs, podcasts, and multimedia streams from various network sources. It supports subtitles, closed captions and is translated in numerous languages. commands: - vlc snap-id: RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd tracking: latest/stable refresh-date: today at 10:32 UTC channels: latest/stable: 3.0.16 2021-06-28 (2344) 310MB - latest/candidate: 3.0.16 2021-06-28 (2344) 310MB - latest/beta: 3.0.17-1-2-g0cc084b032 2022-02-28 (2848) 335MB - latest/edge: 4.0.0-dev-18410-g56db9925fc 2022-02-28 (2849) 614MB - installed: 3.0.16 (2344) 310MB -
By default, Snap stores all packages in /var/lib/snapd/snaps/ directory. You can list them with the following command:
ls /var/lib/snapd/snaps/
You should see the following output:
core18_2284.snap snapd_14978.snap vlc_2344.snap
List Install Snap Packages
To list all Snap packages installed on your system, run the following command:
snap list
You will get a list of all installed packages in the following output:
Name Version Rev Tracking Publisher Notes core18 20211215 2284 latest/stable canonical* base snapd 2.54.3 14978 latest/stable canonical* snapd vlc 3.0.16 2344 latest/stable videolan* -
Update a Package with Snap
To update the package, run the following command:
snap refresh vlc
This will update the VLC package to the latest version.
If you want to see recent changes made by Snap, run the following command:
snap changes
You should see the following output:
ID Status Spawn Ready Summary 1 Done today at 10:30 UTC today at 10:30 UTC Initialize system state 2 Done today at 10:31 UTC today at 10:32 UTC Install "vlc" snap 3 Done today at 10:31 UTC today at 10:31 UTC Initialize device
Remove a Snap Package
If you want to remove a specific package from your system, run the following command:
snap remove vlc
This will remove a VLC package from the system.
Conclusion
In this post, we explained how to install and use the Snap package manager on Alma Linux 8. You can now easily install and manage Snap packages on your system. Feel free to ask me if you have any questions.