nano /etc/network/interfaces
---------------------------------------------------------
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.con$
----------------------------------------------------------
save and exit by pressing ctrl+x
nano /etc/wpa_supplicant/wpa_supplicant.conf
----------------------------------------------------------------
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="yourNetworkName"
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="yourNetworkPassword"
}
--------------------------------------------------------
save and exit by pressing ctrl+x
restarts all the networks services :
/etc/init.d/networking restart
or
ifconfig wlan0 down ifconfig wlan0 up