How to Connect to Wi-Fi in Kali Linux: A Complete Guide with Commands and Tips

Kali Linux — a specialized OS for security testing, but even experienced users sometimes encounter problems when connecting to Wi-Fi networksUnlike Ubuntu or WindowsThere's no graphical setup wizard here—you have to work with the terminal, drivers, and configuration files. This article will help you figure out how to connect to a wireless network in Kali Linux in different ways: through nmcli, wpa_supplicant or classic NetworkManager.

We'll cover not only standard scenarios (connecting to open and secure networks), but also rare cases: when the network isn't visible, drivers aren't installed, or authentication errors occur. We'll pay special attention to security - How to avoid connecting to fake access points and why Kali Linux You shouldn't store Wi-Fi passwords in plain text.

If you're new to Linux, don't be intimidated by the command line: every step is explained in detail. For experienced users, advanced methods are provided, including manual configuration. wpa_supplicant.conf and diagnostics of problems using iwconfig And dmesg.

1. Check Wi-Fi hardware and drivers

Before attempting to connect to the network, make sure your Wi-Fi adapter recognized by the system. In Kali Linux For this, standard Linux utilities are used, but there are nuances with proprietary drivers (for example, for adapters Broadcom or Realtek).

Run the command to check the presence of network interfaces:

ip a

Look for the interface with the name wlan0, wlp3s0 or something similar. If it's not there, the adapter isn't detected. A common cause is missing drivers. Check the list of loaded kernel modules:

lsmod | grep -i wifi
  • 🔍 There is no interface wlan* — The adapter is not detected. Drivers may need to be installed (see section 3).
  • 🔄 The interface is there, but it is inactive. - try to enable it with the command ip link set wlan0 up (replace wlan0 to your interface).
  • ⚠️ Errors when executing commands - check user rights (needed) sudo) or system integrity (apt --fix-broken install).
⚠️ Attention: IN Kali Linux disabled by default NetworkManager for interfaces managed systemd-networkdIf the commands don't work, check the service status:
systemctl status NetworkManager systemd-networkd

If there is a conflict, disable the unnecessary service (for example, sudo systemctl disable --now systemd-networkd).

2. Connecting to Wi-Fi via NetworkManager (graphical and terminal methods)

NetworkManager — the easiest way to connect to Wi-Fi in Kali Linux, if you have a graphical shell installed (GNOME, KDE, Xfce). But even in console mode you can use the utility nmtui or nmcli.

Method 1: Graphical interface

  1. Click on the network icon in the taskbar (usually in the upper right corner).
  2. Select the desired network from the list.
  3. Enter the password (if the network is secured) and confirm the connection.

Method 2: Terminal with nmcli

If there is no graphical interface, use the commands:

# View available networks

nmcli dev wifi list

Connect to the network (replace SSID and password)

nmcli dev wifi connect "Network_Name" password "Your_Password"

For hidden networks, add a flag hidden yes:

nmcli dev wifi connect "Hidden_network" password "password" hidden yes
  • 🔐 WPA3 — supported in new versions NetworkManager (update packages if connection fails).
  • 📡 Weak signal - try connecting near the router or use the command iwconfig wlan0 txpower 20 to increase transmission power (license required) root).
  • 🔄 Auto-connection — to connect the network automatically, add the flag connection.autoconnect yes V nmcli.
📊 Which Wi-Fi connection method do you use most often?
Graphical interface
nmcli commands
Manual configuration of wpa_supplicant
Another way

3. Installing drivers for Wi-Fi adapters

If your Wi-Fi adapter is not detected, it is most likely that there are no drivers in the system. Kali Linux Most open source drivers are installed automatically, but for some chips (eg. Broadcom BCM43xx or Realtek RTL88xx) proprietary modules are required.

Step 1: Determine your adapter model

Run the command:

lspci -knn | grep -iA3 net

Look for lines with Network controller. For example:

03:00.0 Network controller [0280]: Broadcom Inc. BCM43142 802.11b/g/n [14e4:4365]

Step 2: Install the driver

For popular adapters, use the following commands:

Manufacturer/Model Installation command Notes
Broadcom (BCM43xx) sudo apt install broadcom-sta-dkms It is necessary to disable conflicting modules: modprobe -r b43 ssb wl
Realtek (RTL8821CE, RTL8188EU) sudo apt install realtek-rtl88xxau-dkms New chips may require manual assembly from GitHub
Intel (AX200, AX210) sudo apt install firmware-iwlwifi It usually works out of the box, but sometimes you need fresh firmware.
USB adapters (TP-Link, Alfa) sudo apt install firmware-realtek For Alfa AWUS036ACH required rtl8812au-dkms

After installation, reboot the system or load the kernel module manually:

sudo modprobe -a wl # for Broadcom

sudo modprobe rtl8xxxu # for Realtek

⚠️ Attention: Drivers for some adapters (eg. Alfa Network or Panda Wireless) may conflict with built-in kernel modules. If Wi-Fi stops working after installation, check the logs:
dmesg | grep -i firmware

And disable conflicting modules (for example, modprobe -r rtl8xxxu).

☑️ Check Wi-Fi drivers

Completed: 0 / 4

4. Manual connection using wpa_supplicant

If NetworkManager does not work or you prefer manual settings, use wpa_supplicant — a standard tool for Wi-Fi management in Linux. This method is useful for automation scripts or systems without a graphical interface.

Step 1: Create a configuration file

Edit the file /etc/wpa_supplicant/wpa_supplicant.conf:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add a block for your network (example for WPA2-PSK):

network={

ssid="Your_Network_Name"

psk="your_password"

key_mgmt=WPA-PSK

}

Step 2: Connect to the network

Launch wpa_supplicant in the background and request the IP address:

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

sudo dhclient wlan0

For open networks (without password) use:

network={

ssid="Open_network"

key_mgmt=NONE

}

  • 🔒 WPA3-SAE - replace key_mgmt on SAE and add ieee80211w=2 to protect against attacks.
  • 📜 Saving password — file wpa_supplicant.conf should be accessible only by root: chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf.
  • 🔄 Auto-connection — add disable_scan_offload=1 in the config if the network does not connect after reboot.
How do I connect to a network with Enterprise authentication (WPA2-Enterprise)?

For 802.1X networks (e.g. in universities or offices) use the following config:

network={

ssid="Corporate_WiFi"

key_mgmt=WPA-EAP

eap=PEAP

identity="your_login"

password="your_password"

phase2="auth=MSCHAPV2"

}

Make sure the package is installed wpasupplicant with EAP support: sudo apt install wpasupplicant.

5. Diagnosing and resolving Wi-Fi problems

If the connection fails, use these commands to diagnose:

Problem Team for diagnostics Possible solution
The network is not displayed sudo iwlist wlan0 scan | grep ESSID Check if the adapter is turned on (rfkill unblock wifi). The network may be hidden.
Authentication error journalctl -u wpa_supplicant -b Please check your password. WPA3 may require an update. wpa_supplicant.
No IP address dhclient -v wlan0 Restart dhclient or set up a static IP in /etc/network/interfaces.
Low speed iwconfig wlan0 | grep"Bit Rate" Change the channel on your router or update your drivers.

Critical error: If there is no internet access after connecting, but the IP address has been received, check the routes with the command ip routeThere is often no default route - add it manually: sudo ip route add default via 192.168.1.1 (replace IP with your router's address).

Common mistakes and solutions:

  • 🚫 "Device not managed" - disable interface management in NetworkManager:
    sudo nmcli dev set wlan0 managed yes
  • 🔌 "Operation not permitted" - run commands with sudo or check the rights on /etc/NetworkManager/system-connections/.
  • 📶 "No scan results" — the adapter may be in monitor mode. Return it to managed mode:
    sudo airmon-ng stop wlan0mon
alias wifi-connect='nmcli dev wifi connect'

alias wifi-list='nmcli dev wifi list'

After this, it is enough to enter wifi-list instead of the full command.-->

6. Security: How to avoid connecting to a fake access point

Kali Linux is often used for security testing, so attackers can purposefully create fake access points (for example, with the name Free_WiFi or Starbucks_Guest). Follow these rules to avoid data leaks:

  • 🔍 Check the network name - even one extra character (for example, CoffeeShop_Guest instead of CoffeeShop_Guest) may indicate phishing.
  • 🔒 Use a VPN - V Kali Linux easy to set up OpenVPN or WireGuard to encrypt traffic.
  • 📛 Disable automatic connection - V NetworkManager Disable automatic connection to unknown networks:
    nmcli connection modify"Network_name" connection.autoconnect no
  • 🛡️ Check certificates - for Enterprise networks, always use a server certificate (parameter ca_cert V wpa_supplicant.conf).

To check if a network is fake, compare it BSSID (MAC address) with the official one. To do this:

sudo iwlist wlan0 scan | grep -A 10"Network_Name"

If the MAC address is different from what you expect (for example, on the router's label), do not connect!

⚠️ Attention: IN Kali Linux The firewall is disabled by default ufw. Enable it before connecting to public networks:
sudo ufw enable

sudo ufw default deny incoming

This will block unauthorized incoming connections.

7. Configuring Wi-Fi for specific tasks (monitoring, testing)

Kali Linux is often used to test the security of Wi-Fi networks. If you need to switch the adapter to monitoring mode (for example, to scan networks using airodump-ng), run:

sudo airmon-ng check kill

sudo airmon-ng start wlan0

After this interface wlan0 will be replaced by wlan0monTo return it to normal mode:

sudo airmon-ng stop wlan0mon

sudo systemctl start NetworkManager

Important: In monitoring mode, the adapter cannot connect to networks! To scan and stay online at the same time, use a second Wi-Fi adapter.

For speed testing Use Wi-Fi iperf3:

# On the server (for example, on another PC on the network)

iperf3 -s

On the client (Kali Linux)

iperf3 -c 192.168.1.100

FAQ: Frequently Asked Questions about Wi-Fi in Kali Linux

🔹 Why can't Kali Linux see my Wi-Fi network, even though other devices do?

Possible reasons:

  1. The adapter does not support your network standard (for example, 802.11ac on old chips).
  2. The network is operating on a channel that is banned in your country (for example, channels 12-14 in 2.4 GHz). Check the region: sudo iw reg get.
  3. The adapter driver does not support scanning in 5 GHzTry forcing the range: sudo iwlist wlan0 scan freq 2412-2484.

If the problem persists, update your drivers or use an external USB adapter that supports it. 802.11ac (For example, Alfa AWUS1900).

🔹 How to connect to Wi-Fi without a password (open network)?

For open networks use:

Method 1 (NetworkManager):

nmcli dev wifi connect "Open_Network" --ask

When prompted for a password, simply click Enter.

Method 2 (wpa_supplicant):

network={

ssid="Open_network"

key_mgmt=NONE

}

⚠️ Warning: Open networks don't encrypt traffic. Always use a VPN!

🔹 Is it possible to save a Wi-Fi password in encrypted form?

Yes, in NetworkManager passwords are stored in encrypted form in files /etc/NetworkManager/system-connections/. However:

  • Files are available to the user root, so an attacker with physical access to the machine can read them.
  • For extra protection, use LUKS to encrypt the entire disk.
  • IN wpa_supplicant.conf The password is stored in clear text unless used wpa_passphrase to generate a hash.

To generate a password hash for wpa_supplicant.conf:

wpa_passphrase"Network_Name""Password"

Copy the resulting block psk=... in config.

🔹 Kali Linux connects to Wi-Fi, but there's no internet. What should I do?

Check in order:

  1. IP address: ip a show wlan0 — if there is no address, request it manually: sudo dhclient wlan0.
  2. Default route: ip route - if it is not there, add: sudo ip route add default via 192.168.1.1.
  3. DNS: Check name resolution: nslookup google.comIf it doesn't work, enter the DNS manually:
    echo"nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
  4. Firewall: Make sure that ufw or iptables do not block traffic: sudo ufw status.
  5. Problems with the router: Reboot your router or check if it is turned on AP Isolation (client isolation).
🔹 How do I disable automatic connection to a specific network?

For NetworkManager:

nmcli connection modify"Network_name" connection.autoconnect no

For wpa_supplicant remove the block network={...} from /etc/wpa_supplicant/wpa_supplicant.conf or add a parameter disabled=1:

network={

ssid="Unwanted_network"

disabled=1

}