Note: Sudo-I
1. Power on the wireless network card
Iwconfig wlan0 txpower on
2. List wireless networks in a region
Iwlist wlan0 Scan
3. If you want to connect to the network guys (that is, the network where Essid is guys, And Essid is the name you set), enter the command
Iwconfig wlan0 Essid "guys"
If the network is encrypted, the password is pl Ukai cn'; font-style: normal; font-variant: normal; font-weight:
Normal; letter-Spacing: normal; line-Height: normal; orphans: 2;
Text-indent: 0px; text-transform: none; white-space: normal; widows: 2;
Word-Spacing: 0px; font-size: Medium; "> font-family: tahoma, 'trebuchet Ms ', 'lucida
Grande ', verdana, Arial, sans-serif; font-size: 15px; line-Height: 19px;
Text-align: Left; "> 0592121314
Enter the command
Iwconfig wlan0 Essid "guys" Key 0592121314
4. If it is normal, enter
Iwconfig wlan0
You can see the parameters of the normal connection.
5. enable wireless Nic
Ifconfig wlan0 up
6. If the IP address is obtained through DHCP, use dhclient
Or dhcpcd to get the IP address
Dhclient wlan0
Or
Dhcpcd wlan0
7. Ping www.google.com