Reference:
Https://wiki.archlinux.org/index.php/Wireless_network_configuration_ (%e7%ae%80%e4%bd%93%e4%b8%ad%e6%96%87) #. e6.89.8b.e5.8a.a8.e8.ae.be.e7.bd.ae
Https://wiki.archlinux.org/index.php/WPA_supplicant_ (%e7%ae%80%e4%bd%93%e4%b8%ad%e6%96%87)
Http://blog.chinaunix.net/uid-29181887-id-4330184.html
Currently, most wireless cards use WPA, so you need to use Wpa_supplicant:
Yum Install Wpa_supplicant
Note: Some documents refer to IW (after 7.0) and Wireless-tools (before 7.0) for WEP encryption and unencrypted, not for most current situations
1. Up WLAN interface:
Ifconfig wlp0s20f0u1 up
IP link Set wlp0s20f0u1 up
2. Write WPA configuration file:
Cat/etc/wpa_supplicant/test.conf
Ctrl_interface=/var/run/wpa_supplicant
Ctrl_interface_group=wheel
Update_config=1
Fast_reauth=1
Ap_scan=1
network={
Ssid= "my_wifi_2.4"
psk= "Password"
}
3. Link WiFi:
Wpa_supplicant-b-I. wlp0s20f0u1-c/etc/wpa_supplicant/test.conf
4. Automatically obtain IP:
Dhclient WLP0S20F0U1