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.
但这仅适用于WEP加密:
sudo iwconfig wlan0 essid name key s:abcdef
sudo dhclient wlan0
水协
您将需要安装wpa-supplicant
( sudo apt-get install wpasupplicant
)
安装后编辑sudo nano /etc/wpa_supplicant.conf
例如:
network={
ssid="ssid_name"
psk="abcdef"
}
最后,您可以使用命令进行连接:
sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && sudo dhclient wlan0