I can connect to wifi
sudo ifconfig wlan0 up sudo iwconfig wlan0 essid sudo dhclient wlan0
but I don't know how to connect to encrypted wlan so please tell me how to do that, if a wifi password is "abcdef" Thank you.
But this is only working with WEP encryption:
sudo iwconfig wlan0 essid name key s:abcdef
sudo dhclient wlan0
WPA
You will need to install wpa-supplicant
(sudo apt-get install wpasupplicant
)
After you have installed edit the sudo nano /etc/wpa_supplicant.conf
For example:
network={
ssid="ssid_name"
psk="abcdef"
}
And finally you can connect with commands:
sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && sudo dhclient wlan0