How To Install rootlesskit on Kali Linux

In this tutorial we learn how to install rootlesskit on Kali Linux. rootlesskit is Linux-native fake root for rootless containers

Introduction

In this tutorial we learn how to install rootlesskit on Kali Linux.

What is rootlesskit

rootlesskit is:

The purpose of RootlessKit is to run Docker and Kubernetes as an unprivileged user (known as “Rootless mode”), so as to protect the real root on the host from potential container-breakout attacks.

RootlessKit creates user_namespaces(7) and mount_namespaces(7), and executes newuidmap(1)/newgidmap(1) along with subuid(5) and subgid(5).

RootlessKit also supports isolating network_namespaces(7) with userspace NAT using “slirp”.

This Debian package doesn’t support vpnkit mode.

On Debian system, kernel.unprivileged_userns_clone should be enabled.

There are three methods to install rootlesskit on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install rootlesskit Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install rootlesskit using apt-get by running the following command:

sudo apt-get -y install rootlesskit

Install rootlesskit Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install rootlesskit using apt by running the following command:

sudo apt -y install rootlesskit

Install rootlesskit Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install rootlesskit using aptitude by running the following command:

sudo aptitude -y install rootlesskit

How To Uninstall rootlesskit on Kali Linux

To uninstall only the rootlesskit package we can use the following command:

sudo apt-get remove rootlesskit

Uninstall rootlesskit And Its Dependencies

To uninstall rootlesskit and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove rootlesskit

Remove rootlesskit Configurations and Data

To remove rootlesskit configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge rootlesskit

Remove rootlesskit configuration, data, and all of its dependencies

We can use the following command to remove rootlesskit configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge rootlesskit

Dependencies

rootlesskit have the following dependencies:

References

Summary

In this tutorial we learn how to install rootlesskit package on Kali Linux using different package management tools: apt, apt-get and aptitude.