How to Connect Wi-Fi in Kali Linux: A Complete Setup Guide

operating system Kali Linux Kali is the de facto standard for information security professionals, but its use of wireless interfaces often poses challenges for beginners. Unlike desktop distributions like Ubuntu or Mint, where connections are handled automatically through a graphical interface, Kali prioritizes manual control and command-line utilities. This is necessary for security audits, but can be a hindrance during regular network operations.

The main difficulty is that many Wi-Fi adapters Require specific drivers to operate in monitor mode, which is critical for packet capture. Standard drivers supplied with the Linux kernel often limit the device's functionality, allowing only connection to an access point but not traffic analysis. Understanding the architecture of network interfaces in Linux is the first step to successfully configuring your hardware.

In this guide, we'll walk you through the connection process from A to Z, from checking hardware compatibility to setting up a static IP address and resolving common issues with NetworkManagerYou'll learn not just how to "catch a network," but how to manage connections at the level necessary for professional work with wireless protocols.

Checking compatibility and installing drivers

Before attempting to set up a connection, you need to make sure that your wireless adapter physically recognized by the system and has the necessary drivers. Kali Linux has an excellent driver base, but for chipsets from Realtek or MediaTek Manual installation of proprietary modules is often required. Without the correct driver, the adapter may appear as a wired device or not work at all.

To begin, run the command lsusb in the terminal to see a list of connected USB devices. Find your Wi-Fi module in the list and write down its Vendor ID and Product ID. This information will be needed if the standard drivers don't work. It's also helpful to use the utility iwconfig, which will show the status of all wireless interfaces.

⚠️ Note: Some adapters with Realtek chipsets (e.g., the RTL8812AU series) require compiling drivers from source via DKMS. Make sure you have the packages installed. build-essential And linux-headers before starting the installation.

If the adapter is detected but does not work, try installing the package firmware-realtek or firmware-misc-nonfree via the repository. After installing the drivers, you must reboot the system or reconnect the kernel module with the command modprobeCorrect driver installation is the foundation for stable operation of the entire network.

How to check if the adapter supports monitor mode?

Run the "iw list" command and find the "Supported interface modes" section. If the word "monitor" is listed there, your device is technically capable of operating in monitor mode, which is critical for penetration testing.

Managing network interfaces via the terminal

In Kali Linux, the main network management tool has long been ifconfig, however, modern versions of the distribution are actively switching to the utility ip from the package iproute2. Knowledge of commands ip is a must-have skill for any system administrator. These commands allow you to raise and lower interfaces, assign addresses, and check statistics.

To enable the wireless interface (usually called wlan0) use the command sudo ip link set wlan0 upIf the interface is in the "DOWN" state, no operations are possible with it. After activation, you can check the status with the command ip addr show wlan0, which will display the current IP address and MAC address of the device.

  • 📡 ip link show — displays the status of all network interfaces and their flags (UP/DOWN).
  • 🔌 sudo ip link set wlan0 up — activates the selected wireless adapter.
  • 🛑 sudo ip link set wlan0 down — disables the interface, which is necessary before changing the operating mode.
  • 🔄 sudo ip link set wlan0 name wlan1 - renames the interface if required.

To apply the settings permanently, you need to edit the configuration files or use graphical managers such as NetworkManagerHowever, for pentesting purposes, the console method is preferable due to its reliability and predictability.

Connecting to a Wi-Fi network using NetworkManager

For everyday use and quick connection to known access points in Kali Linux, it is most convenient to use a graphical tool NetworkManager or its console analogue nmtuiThis eliminates the need to manually enter complex commands each time you change locations. Interface nmtui looks like a text menu and is controlled by the keyboard arrows.

Run the utility with the command nmtui and select "Edit a connection" or "Activate a connection." Find your SSID in the list of available networks, enter the password, and confirm the action. The system will automatically obtain an IP address via DHCP and configure DNS servers. This is the easiest way to access the internet.

⚠️ Note: When running in a virtual machine (VirtualBox or VMware), the laptop's built-in Wi-Fi adapter is often unavailable to the guest OS. You will need an external USB Wi-Fi adapter, which must be forwarded to the virtual machine through the hypervisor's devices menu.

If the graphical interface does not work, you can use the utility nmcli. Team nmcli dev wifi connect "SSID" password "password" Allows you to connect to the network in one step. This is especially useful when setting up servers without a graphical shell or when writing automation scripts.

☑️ Checking the connection via NetworkManager

Completed: 0 / 5

Manual Wi-Fi setup via wpa_supplicant

In situations where graphic managers are missing or not working correctly, a bundle of utilities comes to the rescue wpa_supplicant And dhclientThis method is considered "classic" and allows one to understand the underlying principles of wireless connections in Linux. It requires creating a configuration file with a hashed password.

First, you need to generate a password hash for your network so you don't have to store it in plaintext. Use the command wpa_passphrase "SSID" "password"The resulting output must be saved to a file. /etc/wpa_supplicant/wpa_supplicant.confAfter this, the supplicant daemon itself is launched, which handles authorization.

sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

After successfully associating with the access point, you need to request an IP address. To do this, use the command sudo dhclient wlan0If everything went well, you'll receive an address from the router's pool and be able to access the network. This method is especially useful on minimalist Kali builds or when restoring a system.

  • 🔑 wpa_passphrase — generates a secure config with an encrypted WPA/WPA2 key.
  • ⚙️ wpa_supplicant — a daemon that controls the connection and encryption process.
  • 🌐 dhclient — a DHCP client that requests an IP address and routes from the server.
  • 📝 /etc/wpa_supplicant/ — the directory where connection profiles are stored.

Diagnosing and resolving connection problems

Even with proper configuration, connection issues may still occur, such as an infinite IP address acquisition or low speed. Often, the cause lies in a driver conflict or an incorrectly selected channel. To diagnose this, use the command dmesg | tail immediately after attempting to connect to see system logs and kernel errors.

Another common problem is the wireless module being blocked by software or hardware. Utility rfkill allows you to check the status of the blocks. If you see "Soft blocked: yes", unblock the adapter with the command sudo rfkill unblock wifiThis is a common situation after an incorrect system shutdown.

Team Purpose Output example
rfkill list Shows the status of blocks 0: phy0: Wireless LAN Soft blocked: no
iw dev wlan0 link Information about the current connection Connected to 00:11:22:33:44:55 (on wlan0)
ping 8.8.8.8 Checking network availability 64 bytes from 8.8.8.8: icmp_seq=1 ttl=116
systemctl status NetworkManager Network Management Service Status Active: active (running)

If the problem persists, try temporarily disabling the NetworkManager service, as it may conflict with manual settings. wpa_supplicantIt's also worth checking whether your router is on a channel that's heavily polluted by neighboring networks. Switching to channel 1, 6, or 11 in the router settings often resolves the issue of an unstable connection.

📊 What's the most common problem you encounter when setting up Wi-Fi in Kali?
The driver is not suitable
Doesn't see the network
Doesn't receive an IP address
It works, but it's slow.
Everything works right away

Setting up static IP and DNS

Some security auditing tasks or work with local servers require a fixed IP addressUnlike dynamic allocation, static configuration ensures that the device's address will not change after a reboot. This simplifies firewall rules and access to the device from other computers.

In modern versions of Kali, connections are managed through files in the directory /etc/NetworkManager/system-connections/However, for quick testing, you can set the address manually via ip addr addFor example, the team sudo ip addr add 192.168.1.50/24 dev wlan0 assigns the specified address with subnet mask to the interface.

⚠️ Note: When manually configuring the IP address, do not forget to also specify the default gateway using the command ip route add default via 192.168.1.1, otherwise you will not have internet access, only local connection.

Setting is no less important DNS servers, which are responsible for converting domain names into IP addresses. File /etc/resolv.conf contains these settings. Add the following lines there nameserver 8.8.8.8 (Google) or nameserver 1.1.1.1 (Cloudflare) to ensure reliable name resolution even when ISP DNS is unstable.

How to make DNS settings permanent?

The resolv.conf file is often overwritten by the system. To fix DNS, it's best to configure it in the NetworkManager interface or add the dns parameter to the DHCP client configuration. You can also prevent file updates by access rights, but this is a less flexible method.

Why doesn't Kali Linux see my Wi-Fi adapter?

Most likely, a driver for a specific chipset model is missing. Check the lsusb command output, find the device ID, and search for the driver on GitHub or in the kali-linux-topical repositories. Drivers for rtl88xxau or mt7921 are often required.

Is it possible to share Wi-Fi with Kali Linux?

Yes, if your adapter supports AP (Access Point) mode. This can be done through NetworkManager settings (Create Hotspot) or through the hostapd and dnsmasq utilities for more granular control.