How To Install selinux-policy-dev on Kali Linux
Introduction
In this tutorial we learn how to install selinux-policy-dev on Kali Linux.
What is selinux-policy-dev
selinux-policy-dev is:
The SELinux Reference Policy (refpolicy) is a complete SELinux policy, as an alternative to the existing strict and targeted policies available from http://selinux.sf.net. The goal is to have this policy as the system policy, be and used as the basis for creating other policies. Refpolicy is based on the current strict and targeted policies, but aims to accomplish many additional goals:
- Strong Modularity
- Clearly stated security Goals
- Documentation
- Development Tool Support
- Forward Looking
- Configurability
- Flexible Base Policy
- Application Policy Variations
- Multi-Level Security
This package provides header files for building your own SELinux policy packages compatible with official policy packages.
There are three methods to install selinux-policy-dev 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 selinux-policy-dev Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install selinux-policy-dev using apt-get by running the following command:
sudo apt-get -y install selinux-policy-devInstall selinux-policy-dev Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install selinux-policy-dev using apt by running the following command:
sudo apt -y install selinux-policy-devInstall selinux-policy-dev 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 selinux-policy-dev using aptitude by running the following command:
sudo aptitude -y install selinux-policy-devHow To Uninstall selinux-policy-dev on Kali Linux
To uninstall only the selinux-policy-dev package we can use the following command:
sudo apt-get remove selinux-policy-devUninstall selinux-policy-dev And Its Dependencies
To uninstall selinux-policy-dev and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove selinux-policy-devRemove selinux-policy-dev Configurations and Data
To remove selinux-policy-dev configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge selinux-policy-devRemove selinux-policy-dev configuration, data, and all of its dependencies
We can use the following command to remove selinux-policy-dev configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge selinux-policy-devDependencies
selinux-policy-dev have the following dependencies:
- checkpolicy
- gawk
- m4
- make
- policycoreutils
- policycoreutils-dev
- policycoreutils-python-utils
- python3
- selinux-utils
References
Summary
In this tutorial we learn how to install selinux-policy-dev package on Kali Linux using different package management tools: apt, apt-get and aptitude.