Connect to wifi in linux, and connect to wifi in linux
Perform the following steps: --------- (when you type the following commandCase Sensitive and Space.)
1. Access the terminal treminal to obtain administrator privileges -------------------- su command (# su)
2. view available wireless NICs, and write down the NIC name after the Interface (my name is wlp9s0) ------------------- iw command (# iw dev)
3. check the activation status of the wlp9s0 Nic. If you do not enter ''up'' in the angle brackets, it indicates that the NIC is not activated, if any, skip steps 4th and 5th -------------------- ip command (# ip link show wlp9s0)
4. Activate the wlp9s0 Nic -------------------------------------- ip command (# ip link set wlp9s0 up)
5. Check the NIC activation status again. If the NIC is not activated, repeat the preceding steps and restart the computer to activate the NIC again. --- ip link show wlp9s0)
6. Search for nearby available wireless networks -------------------------- iw command (# iw wlp9s0 scan | grep SSID)
7. if an available wireless network exists, the red 'ssid 'is followed by its terminology, the wireless name I used is the ''mo'' -------- wpa_supplicant command (# wpa_supplicant-B-I wlp9s0-c <(wpa_passphrase "mo" "wireless password "))
8. assign an IP address for this Nic ----------------------------- dhclient command (# dhclient wlp9s0)
9. Wait for a moment to continue. Check the NIC activation status and check that the LOWER_UP entry is added to <> to verify that the operation is successful.
10. The last step is to test the network connection status. You can also directly open the browser to test the ---------- ping Command (# ping www.baidu.com) ----- You can establish a connection with www.baidu.com and press ctrl + c to stop the ping command.