On several of my Linux operating systems I found that Btop++ wasn’t in the repositories, but was available via Snap package. Consequently, I only recently started using Snap after Ubuntu only included Firefox via Snap package. Snap is an interesting way to package an application with it’s libraries in a SquashFS file system with metadata in a single file, .snap, which is later decompressed and attached to the Linux file system. This allows the application to use specific libraries and avoids conflicts with other library versions in Linux maintained by the OS package manager. Also, this is in a sense a virtualized application that is sandboxed from the host operating system with its own file system and limited access to the host via interfaces with access to the host kernel using the AppArmor Linux kernel security module. This is similar to how Docker works and with other systems like AppImage and Flatpak.
To install Snap on Debian or Ubuntu systems:
sudo apt install snapd
To install Snap on an Manjaro:
sudo pacman -S snapd
To install Snap on a Redhat based system, e.g. Fedora, Alma, Rocky:
sudo dnf install snapd
Once installed activate in systemd:
sudo systemctl enable snapd --now
And now you can use Snap and check the version.
snap --version
Search for package:
snap find btop
Get verbose info on btop which will show author, confinement of virtual environment and available channels…
snap info btop --verbose
Now we can install btop++ and run our Snap app in Debian or Ubuntu:
sudo snap install btop
And once installed we can run btop and enjoy a much improved system monitor. One note, you may have to logout and back in for the path to snap apps to be picked up, or run from the file location.
/snap/bin/btop
And here we see Btop++ running on my Raspberry Pi 4 Bitcoin/Lightning Node:
If you get an error trying to run the application, you may need to update the core package with the command:
sudo snap install core
According to the documentation snapd is supposed to check for updates and apply them on its own. I find that it doesn’t, but I mostly run my Linux desktops in virtualization on demand so I just include a Snap refresh with my system update commands when I login.
For Debian/Ubuntu:
sudo apt update && sudo apt dist-upgrade && sudo snap refresh
Manjaro:
sudo pacman -Syyuu && sudo snap refresh
Fedora/Alma/Rocky:
sudo dnf update && sudo snap refresh
If you wanted to remove Btop++:
sudo snap remove btop
To list what Snap packages are installed:
snap list
Now Snap was created by Canonical for Linux kernel systems primarily for their Ubuntu systems, but it has been picked up by other distros. The major complaint is that the Ubuntu Snap store is closed source per the Wikipedia Receptions section:
Some developers have praised Snap.[83] Heroku said Snap auto-update fits their fast release schedule well, Microsoft mentioned its ease of use and being YAML-based, as well as it being distribution-agnostic, and JetBrains said the Snap Store gives their tools more exposure.
Others have objected to the closed-source nature of the Snap Store. Clement Lefebvre (Linux Mint founder and project leader[84][85]) has written that Snap is biased and has a conflict of interest. The reasons he cited include it being governed by Canonical and locked to their store, and also that Snap works better on Ubuntu than on other distributions.[86] He later announced that the installing of Snap will be blocked,[87] although a way to disable this restriction will be documented.[88]
https://en.wikipedia.org/wiki/Snap_(software)
And with docker or running any other type of already prepared virtualization, you’ll want to be conscious of the creator. The Snap Store does an automated scan for malware and check of the packages, but something could still be slipped in. But at least your host has some protection from what the software is allowed to do. There was one case where an author in 2018 slipped some cryptocurrency mining code into a couple packages, but they were taken down and transferred to another author to create and manage those packages. And you can use snapcraft to create your own packages.
Official documentation: https://snapcraft.io/docs/getting-started