How to install Drogue IoT CLI on Ubuntu using Snap

Snap is a popular package manager that allows you to easily install software on Linux-based Operating Systems. It was developed and is maintained by Canonical. Snap was originally created for cloud-based applications, but its support has since been extended to include desktop applications and IoT devices. The packages installed using snap are referred to as snaps and the service that maintains the snaps is known as snapd.

drg is a tool to managed applications and devices in a Drogue IoT Cloud instance.

In this article, we will briefly demonstrate how to install Drogue IoT CLI – The Drogue IoT command line tool on Ubuntu using snap.

How to install snapd on Ubuntu

snapd is the service that runs and manages snaps for you, including performing automatic updates. Installation instructions and supported versioning information for each of the following Linux distributions can be found here.

If you’re running Ubuntu 16.04 LTS (Xenial Xerus) or later, including Ubuntu 18.04 LTS (Bionic Beaver), Ubuntu 18.10 (Cosmic Cuttlefish) and Ubuntu 19.10 (Eoan Ermine), you don’t need to do anything. Snap is already installed and ready to go.

For versions of Ubuntu between 14.04 LTS (Trusty Tahr) and 15.10 (Wily Werewolf), as well as Ubuntu flavours that don’t include snap by default, snap can be installed from the Ubuntu Software Centre by searching for snapd.

Alternatively, snapd can be installed from the command line:

sudo apt update
sudo apt install snapd

Once the command completed itself, update your system paths for snap by logging out and back in again, or restarting your computer.

See also  How to install GNOME Logs on Ubuntu using Snap

For those who need to know which version of Ubuntu you’re running, open System Settings and select Details. Alternatively, from the command line, type lsb_release -a.

Verify that snapd is running

Before actually installing Drogue IoT CLI, check the status of the “snapd” service by running the following command:

sudo systemctl status snapd.socket

image-20220101095041074

In our case, it shows that the snapd service is already installed and running without any issues.

Install Drogue IoT CLI snap – The Drogue IoT command line tool

Login to the Ubuntu system and then open the terminal by pressing CTRL+ALT+ T buttons. Run below command to install the Drogue IoT CLI snap package. The Drogue IoT CLI snap package is published by Jens Reimann and has been verified by the Snap team as safe. At the time of this writing, the current version of Drogue IoT CLI is v0.8.0. The software is licensed under Apache-2.0 license.

sudo snap install --classic 

The --classic argument is required here as Drogue IoT CLI needs full access to your system in order to be useful, therefore it needs snap’s “classic confinement”. By default, snaps are much more restricted in their ability to access your disk and network, and they have to request special access from you where they need it.

Please note that Drogue IoT CLI package installed with snap is auto-updated, which means you don’t have to do anything to be able to use the latest version of Drogue IoT CLI, unlike with apt or yum.

Conclusion

You can find more details about Drogue IoT CLI at its official website. Snaps are much more than just a new Linux package format – they’re a sophisticated way to deliver complex applications to any desktop environment! To get started with snaps, learn about their security features, transactions and more from the man page or Canonical’s advanced snap usage tutorial. There are also plenty of great snaps besides Drogue IoT CLI – The Drogue IoT command line tool available in the store for your Linux desktop, like vscode, atom, slack and spotify.

Leave a Comment