How To Install policy-rcd-declarative on Kali Linux
Introduction
In this tutorial we learn how to install policy-rcd-declarative on Kali Linux.
What is policy-rcd-declarative
policy-rcd-declarative is:
Debian policy states that packages providing system services need to start those services by default, and that the starting of the service should be done by way of the /usr/sbin/invoke-rc.d script. This script will execute a program /usr/sbin/policy-rc.d if it exists, allowing the local system administrator to override behaviour if wanted by creating a policy script accordin to the interface specified and installing it under the correct name. This interface is however somewhat problematic, as explained in https://bugs.debian.org/911290.
This package attempts to provide a solution by shipping a policy-rc.d script that allows system administrators to define policies in a declarative way through one or more configuration files, rather than providing one script that may be overwritten.
There are three methods to install policy-rcd-declarative 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 policy-rcd-declarative Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install policy-rcd-declarative using apt-get by running the following command:
sudo apt-get -y install policy-rcd-declarativeInstall policy-rcd-declarative Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install policy-rcd-declarative using apt by running the following command:
sudo apt -y install policy-rcd-declarativeInstall policy-rcd-declarative 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 updateAfter updating apt database, We can install policy-rcd-declarative using aptitude by running the following command:
sudo aptitude -y install policy-rcd-declarativeHow To Uninstall policy-rcd-declarative on Kali Linux
To uninstall only the policy-rcd-declarative package we can use the following command:
sudo apt-get remove policy-rcd-declarativeUninstall policy-rcd-declarative And Its Dependencies
To uninstall policy-rcd-declarative and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove policy-rcd-declarativeRemove policy-rcd-declarative Configurations and Data
To remove policy-rcd-declarative configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge policy-rcd-declarativeRemove policy-rcd-declarative configuration, data, and all of its dependencies
We can use the following command to remove policy-rcd-declarative configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge policy-rcd-declarativeDependencies
policy-rcd-declarative have the following dependencies:
References
Summary
In this tutorial we learn how to install policy-rcd-declarative package on Kali Linux using different package management tools: apt, apt-get and aptitude.