How To Install hostapd on Kali Linux
Introduction
In this tutorial we learn how to install hostapd
on Kali Linux.
What is hostapd
hostapd is:
IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/WPA3/EAP Authenticator
Originally, hostapd was an optional user space component for Host AP driver. It adds more features to the basic IEEE 802.11 management included in the kernel driver: using external RADIUS authentication server for MAC address based access control, IEEE 802.1X Authenticator and dynamic WEP keying, RADIUS accounting, WPA/WPA2/WPA3 (IEEE 802.11i/RSN) Authenticator and dynamic TKIP/CCMP keying.
The current version includes support for other drivers, an integrated EAP authenticator (i.e., allow full authentication without requiring an external RADIUS authentication server), and RADIUS authentication server for EAP authentication.
hostapd works with the following drivers:
- mac80211 based drivers with support for master mode [linux]
- Host AP driver for Prism2/2.5/3 [linux]
- Driver interface for FreeBSD net80211 layer [kfreebsd]
- Any wired Ethernet driver for wired IEEE 802.1X authentication.
There are three methods to install hostapd
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 hostapd Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install hostapd
using apt-get
by running the following command:
sudo apt-get -y install hostapd
Install hostapd Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install hostapd
using apt
by running the following command:
sudo apt -y install hostapd
Install hostapd 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 hostapd
using aptitude
by running the following command:
sudo aptitude -y install hostapd
How To Uninstall hostapd on Kali Linux
To uninstall only the hostapd
package we can use the following command:
sudo apt-get remove hostapd
Uninstall hostapd And Its Dependencies
To uninstall hostapd
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove hostapd
Remove hostapd Configurations and Data
To remove hostapd
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge hostapd
Remove hostapd configuration, data, and all of its dependencies
We can use the following command to remove hostapd
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge hostapd
Dependencies
hostapd have the following dependencies:
References
Summary
In this tutorial we learn how to install hostapd
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.