Manual configuration of wireless networks in Linux

Source: Internet
Author: User
iwlist wlan0 scan

From: http://linux-wiki.cn/wiki/%E6%97%A0%E7%BA%BF%E7%BD%91%E5%8D%A1%E9%85%8D%E7%BD% AE

This article describes how to manually configure a wireless network card on the Linux command line interface. Currently, most popular releases support convenient configuration with the network-manager graphical interface, without the original method described in this article.

The following describes how to configure a wireless network in the command line by using commands such as iwconfig and ifconfig. The problem is that the wireless NIC driver has been correctly installed and recognized by the system.

General idea

The general idea of work is as follows:

  1. Enable the power of the wireless network card with iwconfig, and find the wireless network in the area
  2. Connect to the corresponding Wireless Network
  3. Enable the wireless network card through ifconfig and obtain the IP address (if DHCP is used)

Note:
Assume that the wireless network is identified as wlan0. If your network card is not identified as wlan0, you can modify it during the operation. Specific Process

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 myhome (that is, the network where Essid is 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-89

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 obtain the IP address.

dhclient wlan0

Or

dhcpcd wlan0

7. Now the wireless network adapter can be used normally.


PS: When a wireless network card finds a signal but cannot connect to the network using a command line, you can enable "network connection" and manually set network point SSID, password, and other parameters in the wireless bar, automatically connect after saving and exiting ()

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.