1. Open file /etc/network/interfaces
2. Change wlan0 cofiguration
iface wlan0 inet dhcp
wpa_conf /etc/wpa_supplicant/wpa_supplicant.conf
3. Open file /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="name"
psk="password"
priority=5
}
4. ifup wlan0