How to install WiFi adapter drivers in Kali Linux

Working in the operating system Kali Linux Often begins with the need to access a wireless network, whether for traffic analysis, security auditing, or simply internet access. However, unlike desktop distributions, they don't always support all existing network card models out of the box. This is especially true for USB adapters with chips. Realtek or MediaTek, which require manual compilation of kernel modules. Without the correct driver, the device may not be detected by the system at all or may operate in an inefficient mode.

The installation process depends on the specific chip model your device is based on. In some cases, a standard repository update is sufficient, while in others, you'll need to download the source code from GitHub and assemble it manually. It's critical to know your device's exact Vendor ID and Product ID to avoid wasting hours installing incompatible software. In this article, we will examine all current methods for solving this problem, covering both automatic and manual configuration methods.

Identifying a wireless adapter

The first step is always to accurately determine the model of your network interface. The system should at least "see" the physical connection of the device, even if it isn't yet functional in software. For this, use the utility lsusb, which displays a list of all connected USB devices. If you're using the built-in module, you can use the command lspciIn the resulting list, you need to find a line containing manufacturer names such as Realtek, Ralink, or Atheros.

Once you've received the list of devices, pay attention to the IDs, which look like a pair of hexadecimal numbers separated by a colon (e.g., 0bda:8812). These numbers are the key to finding the correct driver. The same chip is often used in adapters from different brands, so you should search for the driver by the chip ID, not the brand name on the housing.

  • 🔍 Connect the adapter and enter in the terminal lsusb to view the list.
  • 🔍 Write down the device ID (Vendor:Product) for further searching in repositories.
  • 🔍 Use the command iwconfigto check if the wireless interface (usually wlan0) has appeared.
  • 🔍 If the device is not displayed even in lsusb, check its functionality on another OS.

Sometimes the system may detect a device but assign it the wrong default driver. In such cases, you must forcefully remove the offending module before installing the correct one. It's also worth remembering that some modern adapters require kernel header files (linux-headers) for successful compilation.

⚠️ Important: If you're using a virtual machine (VirtualBox or VMware), make sure the USB device is forwarded to the Kali guest OS and not captured by the host system. Otherwise, the drivers won't install.
📊 What type of adapter are you using?
Built into the laptop
External USB
PCI-E card
I don't know what mine is
Another type of connection

Preparing the system and installing kernel headers

Before compiling any modules, you must ensure that all the necessary build tools are installed on your system. In distributions based on Debian, which includes Kali, requires the package linux-headers, corresponding to your current kernel version. Without these files, the compiler will not be able to create a compatible driver binary.

First, update your package lists to avoid dependency errors. This is a standard procedure experienced users perform before making any system changes. Next, install a basic compilation toolchain, including the GCC compiler and Make utilities.

sudo apt update

sudo apt install -y linux-headers-$(uname -r) build-essential git

Running this command ensures that you have the latest headers for the specific kernel version you're currently running. If you accidentally update the kernel and reboot without updating the headers, the driver build will fail. Therefore, always check that the versions match.

  • 🛠️ Team uname -r will show the current version of the system kernel.
  • 🛠️ Package build-essential Contains mission-critical C and C++ compilers.
  • 🛠️ Utility git required for cloning repositories with driver source code.

☑️ Preparing the environment

Completed: 0 / 4

In some cases, especially when using custom Kali builds or older versions, the package containing the headers may have a different name or be missing from the repositories. In these cases, manual downloading may be required. .deb packages from official mirrors. However, in current versions Kali Linux 2026+ This situation is rare.

Automatic installation via Kali repositories

The easiest and most reliable way is to search for a ready-made package in the official repositories. Kali Linux developers have included drivers for most popular chips directly in their archives. This eliminates the need for manual compilation. For Realtek chips, for example, packages with the prefix are often available. realtek-rtl.

To find the required package, you can use the repository search. Enter the chip or manufacturer name in the search command. If the package exists, the system will prompt you to install it. This takes just a few seconds and automatically integrates the module into the system.

apt search realtek

sudo apt install realtek-rtl88xxau-dkms

Using marked packages DKMS (Dynamic Kernel Module Support) is preferred. These packages automatically recompile the driver module every time you update the system kernel. This eliminates the need to reconfigure WiFi after each major OS update.

Adapter chipset Package in the repository Support status
Realtek RTL8812AU realtek-rtl88xxau-dkms Stable
Atheros AR9271 firmware-atheros Built into the kernel
Ralink RT5370 firmware-misc-nonfree Stable
MediaTek MT7921 firmware-misc-nonfree Requires a new kernel

Manually installing drivers from GitHub

When ready-made packages aren't available, manual compilation is necessary. Most drivers for WiFi adapters are posted by enthusiasts on GitHub. The process typically involves cloning the repository, running the installation script, and reloading the module. This requires careful execution, as the commands may vary across repositories.

First, find the repository that matches your chip. For example, for the popular RTL8812BU chip, the repository from morrownrAfter cloning the repository, navigate to the created directory. The script is usually located there. install.sh or Makefile.

git clone https://github.com/morrownr/8812bu-20210118.git

cd 8812bu-20210118

sudo./install.sh

The script will automatically compile the module and copy it to the appropriate kernel directory. Once the process is complete, activate the driver with the command modprobe Or simply restart your computer. If everything went well, the interface should appear in the list of network connections.

  • 📂 Clone repositories only from trusted sources with a high star count.
  • 📂 Read the file carefully README.md before running any scripts.
  • 📂 Make sure you have superuser (sudo) privileges to perform the installation.
⚠️ Warning: Third-party scripts from GitHub are executed with root privileges. Before running install.sh It is highly recommended to open the file in a text editor and ensure that it does not contain malicious commands or remote downloads.

Operating mode management and monitoring

After successfully installing the driver, the security specialist is faced with the question of managing the card's operating modes. Standard mode— Managed (client), but auditing often requires monitoring mode (Monitor) or access point (AP). Not all drivers and adapters support packet injection, which is critical for security testing.

To switch modes in Kali Linux, the main tool is the utility airmon-ng from the package aircrack-ng. It allows you to easily switch an interface into monitor mode and back. It's also useful to know how to forcefully disable interfering kernel processes that could hijack control of the adapter.

sudo airmon-ng start wlan0

sudo airmon-ng check kill

Team check kill will terminate processes like wpa_supplicant or NetworkManager, which can block access to raw sockets. This is a common cause of errors when running network scanners. After completing the scan, remember to return the interface to normal mode to restore internet access.

It's important to understand the difference between software and hardware limitations. If the driver is compiled, but the feature list (iw list) there is no monitor mode, then it will not be possible to enable it programmatically - you will need to replace the adapter with one more suitable for pentesting.

Diagnostics and problem solving

Even with proper installation, conflicts may arise. A common problem is the "black list" (blacklist), when the system blocks a certain module from loading due to a conflict with another driver. The adapter may also enter power-saving mode, interrupting the connection. These issues can be resolved by editing configuration files.

To disable power saving, create or edit a configuration file NetworkManagerThis will help stabilize the connection, especially on laptops, where the system tries to save battery power by disabling the WiFi module.

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

In this file, you need to change the value of the parameter wifi.powersave on 2 (which means disabling saving). After saving the changes, restart the network service. This simple step often resolves issues with unstable ping and constant connection drops.

  • 🔧 Check the blacklist in /etc/modprobe.d/blacklist.conf for the presence of your driver.
  • 🔧 Use dmesg | grep firmware to search for microcode loading errors.
  • 🔧 Restart the service systemctl restart NetworkManager applies new settings.
Why doesn't the adapter see 5 GHz networks?

Most likely, your adapter or driver doesn't support the 802.11ac/ax standard, or there are regional restrictions. Check the chip specifications and command. iw reg set to change the region.

How to completely remove a manually installed driver?

If you installed the driver via make install, usually in the source folder there is a command sudo make uninstallIf it is not there, you will have to manually delete the files from /lib/modules/... and clean dkms status.

Can this adapter be used for WiFi distribution?

Yes, if the driver supports AP (Access Point) mode. You can check this via iw listHowever, built-in laptop cards often do not support simultaneous operation of a client and an access point.