How To Install hostapd on Ubuntu 20.04
Introduction
In this tutorial we learn how to install hostapd
on Ubuntu 20.04.
What is hostapd
hostapd is:
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 (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.
Package: hostapd Architecture: amd64 Version: 2:2.9-1ubuntu4 Multi-Arch: foreign Priority: optional Section: universe/net Source: wpa Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian wpasupplicant Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 2128 Pre-Depends: init-system-helpers (>= 1.54~) Depends: libc6 (>= 2.29), libnl-3-200 (>= 3.2.7), libnl-genl-3-200 (>= 3.2.7), libnl-route-3-200 (>= 3.2.7), libssl1.1 (>= 1.1.1), lsb-base Breaks: initscripts (« 2.88dsf-13.3) Filename: pool/universe/w/wpa/hostapd_2.9-1ubuntu4_amd64.deb Size: 750712 MD5sum: a08adb1f7a3793948f4203b633608220 SHA1: 1c7ff2478756b7f3df6f1600051b12bdae8fdd87 SHA256: 7607448cae7ac1c1c75e722d2c6a65ce3817c18b7430943666c77d211f4c4086 Homepage: http://w1.fi/wpa_supplicant/ Description-en: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/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 (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 Ubuntu 20.04. 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 first since aptitude is usually not installed by default on Ubuntu. 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 Ubuntu 20.04
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 Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove hostapd
Remove hostapd Configurations and Data
To remove hostapd
configuration and data from Ubuntu 20.04 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
References
Summary
In this tutorial we learn how to install hostapd
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.