Step 1: Download and run Mr Engman's wireless config script (Network cable attached)
#Fetch @MrEngman config script

#Make it executable
chmod u+x

#Run as root
sudo ./
Step 2: Configure /etc/network/interfaces to set up wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Step 3: Set up wpa_supplicant configuration (/etc/wpa_supplicant/wpa_supplicant.conf)
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

   psk="YOUR WPA2 KEY"
Step 4: Restart networking
/etc/init.d/networking restart