How to Connect to WiFi in Kali Linux Terminal (2024 Guide)

  • Home
  • Blog
  • How to Connect to WiFi in Kali Linux Terminal (2024 Guide)
How to connect to WiFi in Kali Linux using the terminal with nmcli and command line methods
DateDec 17, 2024

How to Connect to wlan0 in Kali Linux Terminal (Step-by-Step Guide)

Kali Linux WiFi terminal setup infographic showing wlan0 activation, nmcli commands, wpa_supplicant, and VirtualBox WiFi configuration



Why Connect via Terminal Instead of the GUI?

AspectGUI (NetworkManager Applet)Terminal
SpeedSlower, multiple clicksFast, one command
Scripting / automationNot possibleEasy to script
Works headlessNoYes
Troubleshooting detailLimitedFull error output




nmcliwpa_supplicant + dhclient
Setup speedOne commandMulti-step
Best forEveryday use, VMsMinimal / headless installs
Auto-reconnectBuilt-inNeeds manual scripting
Requires NetworkManagerYesNo



AdapterChipsetMonitor ModeBand
Alfa AWUS036NHAAtheros AR9271Yes2.4 GHz
Alfa AWUS036ACHRealtek RTL8812AUYesDual-band
TP-Link TL-WN722N (v1 only)Atheros AR9271Yes2.4 GHz
Panda PAU09Ralink RT5372Yes2.4 GHz

IssueLikely CauseFix
wlan0 missing entirelyDriver not installed, or USB not attached in VirtualBoxCheck lsusb, reattach the device, install the correct driver
Interface shows but won’t connectWrong password, weak signalDouble-check credentials, inspect dmesg output
Connects but no internetDNS or DHCP issueRun sudo dhclient wlan0, check /etc/resolv.conf
Adapter detected on host but not in VMExtension Pack missingInstall the VirtualBox Extension Pack, recheck Devices > USB
Doesn’t reconnect after rebootAutoconnect disabledRun nmcli connection modify "SSID" connection.autoconnect yes


1. How to connect Kali Linux to WiFi from terminal?

Run ip a to confirm wlan0 exists, bring it up with sudo ip link set wlan0 up, then connect using sudo nmcli device wifi connect "SSID" password "PASSWORD". This is the fastest method for most setups.

2. Why is wlan0 not showing in Kali Linux?

Usually it’s a missing driver for the adapter’s chipset, an adapter that hasn’t been passed through to VirtualBox, or an interface that’s simply down. Check iw dev and lsusb to narrow down the cause.

3. How to auto connect WiFi on Kali Linux boot?

Connections made through nmcli auto-connect by default. Verify with nmcli connection show, and if it’s off, re-enable it with nmcli connection modify "SSID" connection.autoconnect yes.

4. Can I connect to WiFi in Kali Linux VirtualBox without a USB adapter?

No — VirtualBox doesn’t expose the host’s internal WiFi card to the guest OS. You need an external USB WiFi adapter, ideally one with monitor mode support if you also plan on wireless auditing.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments