How To Install systemctl on Kali Linux

In this tutorial we learn how to install systemctl on Kali Linux. systemctl is daemonless systemctl command to manage services without systemd

Introduction

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

What is systemctl

systemctl is:

“systemctl” is a replacement command to control system daemons without systemd. “systemctl” is useful in application containers where systemd is not available to start/stop services.

This script can also be run as init of an application container (i.e. the main “CMD” on PID 1) where it will automatically bring up all enabled services in the “multi-user.target” and where it will reap all zombies from background processes in the container. When stopping such a container it will also bring down all configured services correctly before exit.

There are three methods to install systemctl 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 systemctl Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install systemctl

Install systemctl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install systemctl

Install systemctl 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 systemctl using aptitude by running the following command:

sudo aptitude -y install systemctl

How To Uninstall systemctl on Kali Linux

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

sudo apt-get remove systemctl

Uninstall systemctl And Its Dependencies

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

sudo apt-get -y autoremove systemctl

Remove systemctl Configurations and Data

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

sudo apt-get -y purge systemctl

Remove systemctl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge systemctl

Dependencies

systemctl have the following dependencies:

References

Summary

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