How to Install and Use Snapd on Kali Linux 

There are several distribution packages available for users to install applications on their Linux system. Some of those aforementioned packages include installers for applications like AppImage and Snap. And in this article we will teach you the necessary procedures to install Snapd on Kali Linux as it is not available by default in Kali.

Kali, a Debian-based distribution, does not have Snap (or Snappy) installed by default. Hence, Kali users have to install it separately for their Linux distro. Although traditional packages exist for specific systems, distribution independent packages like Snap are bundled with the required dependencies to install applications within a single package. 

To elaborate further, the Snap package is capable of hosting distribution-independent packages. This helps in running any package on any Linux distribution or a variety of devices. SnapCraft, an online snap app store, can also be accessed with the help of Snap packages. 

In this article, we will cover how to install and use Snapd packages on Kali Linux. We will also cover how to use Snapd packages. 

Install Snapd on Kali Linux

1. Update Kali Machine 

Before starting with the installation process, it is important to update your machine. To update Kali Linux using the apt update command. 

sudo apt update

You will get a similar output:

update Kali

Wait for the updates to complete before moving forward to the next step. You can also learn how to update your Kali machine by reading further into this article

2. Install Snap on Kali Linux

Secondly, install Snap using the apt install command.

sudo apt install snap

You will get an output similar to this:

install snapd on Kali Linux

The successful installation would look something like this:

install snapd on Kali Linux

In case you get an error during the installation, fix the error using the apt command followed by –fix-broken flag. For example: 

sudo apt --fix-broken install

After that, try installing it again. 

If this command does not work and it is still giving an error, you will have to edit the .bashrc file first. To open this file, use nano, vim, or gedit commands. For example:

gedit ~/.bashrc

Next, add the installation path of Snap at the top of the file as shown below:

export PATH=$PATH:/snap/bin

Save the bash file and exit the editor. Lastly, execute the bash file using the source command. For example:

source ~/.bashrc

Following all that should fix the errors. Now you can continue your installation from Step 2.

3. Install Snapd on Kali Linux

Now, you will install Snapd. Snapd, a REST API daemon, is a background service that manages and maintains Snap package format. To install Snapd, use the following command:

sudo apt install snapd
Install Snapd on Kali Linux

Next, add the service to autoload using the systemctl command. This will automatically start the service when your machine starts. For example:

sudo systemctl enable snapd

You will get a similar output:

Install Snapd on Kali Linux

Lastly, start the service using the systemctl start command. For example:

sudo systemctl start snapd

4. Enable the Service

Before we finish off with the installation, we will enable and start the Systemd unit as shown below:

sudo systemctl enable apparmor
4. Enable the Service

To start the service, type:

sudo systemctl start apparmor 

You can also enable the snapd.socket service using the systemctl command. For example:

sudo systemctl enable snapd.socket snapd apparmor
sudo systemctl start snapd.socket snapd apparmor

And check the status of snapd.socket service using the status command:

sudo systemctl status snapd
sudo systemctl status snapd.socket
Enable the Service

5. Check Snap Version

Next, check the version of Snap using the version command. For example:

snap --version

Your output will look something like this:

Check Snap Version

6. Test Snap Package

Check if Snap is working or not by using the sample “hello-world” package. For example:

snap install hello-world

This command will start downloading the snap “core” from “stable” channel as shown in the output below:

How to Install and Use Snapd in Kali Linux

7. Reboot the System

Lastly, restart your system to implement the installed changes. For this step, use the systemctl command. For example:

sudo systemctl reboot

Alternatively, you can also use this command:

sudo reboot kali

8. Install Snap Store on Kali Linux

You can also use Snap store to view the packages supported by Snap. to install Snap store, use the install command. For example:

sudo snap install snap-store

You will get an output similar to this:

Install Snap Store on Kali Linux

After the installation has been completed, view the Snap store as shown below:


9. View Snap Commands

There exists a list of Snap commands which you can view first before using. To view the list, execute the command given below:

snap help refresh

This will give you a detailed output of the commands you can use with Snap.

View Snap Commands

Finally, you have successfully installed Snap and Snap of Kali Linux. Now, we will look at how to use Snapd on Kali Linux. 

Use Snapd on Kali Linux

1. Install a Snapd Package

To use Snap on Kali Linux machines, we will install a test Telegram package. Before that, let’s look at the existing snapd packages via the list command. For example:

snap list 

This command displays the packages that are installed on the system. If you do not have any installed package, you will get a similar output:

Install a Snapd Package

Next, we will search for our required package using the find command. For example:

snap find telegram-desktop

Your output will look something like this:

Install a Snapd Package

Now that we already have the package, we can start installing it. To install using snapd, type the following command:

sudo snap install telegram-desktop

You will get a similar output:

Install a Snapd Package

2. Run a Snapd Package

Next, run the installed package using the run command. For example:

snap run telegram-desktop

3. Uninstall a Snapd Package

You can also remove the installed Snap packages if you no longer need them. To uninstall a package, execute the following command:

sudo snap remove telegram-desktop

4. Update a Snapd Package

Existing Snap packages can also be updated using the update command. For instance, if you want to update the Telegram package, execute the following command:

sudo snap refresh telegram-desktop

Update Snap on Kali Linux

Since there are still live updates available for Snap as of today, you should keep your eye out for new releases to keep your package manager updated. Snap packages check for updates four times a day to track new versions of the installed packages. Use the refresh command to update the installed Snap on the Kali Linux machine. For example:

sudo snap refresh --list

Alternatively, you can also use this command to view the fresh updates:

sudo snap refresh gtk-common-themes

So that’s it. We hope you’ve picked up a lot on installing and using Snap on Kali Linux. We also covered how to use Snapd and Snap store on your Kali machines, so we hope that helped you too. For more details about Snap packages, you can check out their official documentation… 

If this guide helped you, please share it.

Leave a Reply
Related Posts