Kali linux wpa_supplicant cli config

Kali linux wpa_supplicant cli config

Kali linux wpa_supplicant cli config.

To setup a wifi connection using wpa_supplicant on the cli in kali, first bring up your network interface

ifconfig wlan0 up

next, we create a config file

wpa_passphrase 'router_ssid' 'wifi_password' > /etc/wpa_supplicant.conf

we need to edit the config file and remove some things

vim /etc/wpa_supplicant.conf

change the config file so that it contains:


Finally, we can auth with our router and obtain an ip address

sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
sudo dhclient wlan0

Command Line Options (taken from the wpa_supplicant man page)

Most command line options have global scope.
Some are given per interface, and are only valid if at least one -i option is specified, otherwise they’re ignored. Option groups for different interfaces must be separated by -N option.

-b br_ifname   Optional bridge interface name. (Per interface) 
-B   Run daemon in the background. 
-c filename   Path to configuration file. (Per interface) 
-C ctrl_interface   Path to ctrl_interface socket (Per interface. Only used if -c is not). 
-i ifname   Interface to listen on. Multiple instances of this option can be present, one per interface, separated by -N option (see below). 
-d   Increase debugging verbosity (-dd even more). 
-D driver   Driver to use (can be multiple drivers: nl80211,wext). (Per interface, see the available options below.) 
-f output file   Log output to specified file instead of stdout. 
-g global ctrl_interface   Path to global ctrl_interface socket. If specified, interface definitions may be omitted. 
-K   Include keys (passwords, etc.) in debug output. 
-t   Include timestamp in debug messages. 
-h   Help. Show a usage message. 
-L   Show license (GPL and BSD). 
-p   Driver parameters. (Per interface) 
-P PID_file   Path to PID file. 
-q   Decrease debugging verbosity (-qq even less). 
-u   Enabled DBus control interface. If enabled, interface definitions may be omitted. 
-v   Show version. 
-W   Wait for a control interface monitor before starting. 
-N   Start describing new interface.

sources: wpa_supplicant man page