In linux, configure a command line to connect to a wlan
Source: Internet
Author: User
In linux, the general idea of configuring and connecting to a wlan wireless network card through command line is as follows: use iwconfig to enable the power of the wireless network card, and find the wireless network in the region to connect to the corresponding wireless network to enable the wireless network card through ifconfig, and get the IP address (if DHCP is used) Note: False... in linux, the general idea of configuring and connecting to a wlan wireless network card through command line is as follows: use iwconfig to enable the power of the wireless network card, and find the wireless network in the region to connect to the corresponding wireless network to enable the wireless network card through ifconfig, and get the IP address (if DHCP is used)
Note: if the wireless network is identified as wlan0 and your network card is not identified as wlan0, you can modify it during the operation.
Specific process www.2cto.com 1. power on the wireless network card iwconfig wlan0 txpower on2. list the wireless networks in the region iwlist wlan0 scan3. suppose you want to connect to the network MyHome (that is, the network with essid MyHome ), enter the command iwconfig wlan0 essid "MyHome". if the network is encrypted and the password is 0123456789, enter the command iwconfig wlan0 essid "MyHome" key 0123-4567-894. if the connection is normal, enter iwconfig wlan0 to view the connection parameters. 5. enable the wireless network card ifconfig wlan0 up6. if the IP address is obtained using DHCP, use dhclient or dhcpcd to obtain ipdhclient wlan0 or dhcpcd wlan07. now the wireless network card can be used normally. note: the NetworkManager service must be stopped and the author must keep pace with the times.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.