CentOS6.4 wireless Internet access command line configuration

Source: Internet
Author: User

CentOS6.4 wireless Internet access command line configuration
Refer to: drivers. Check whether the wireless NIC driver is installed.

1 xxx#iwconfig
If you print the information of the wireless network card of wlan0 (or other names), it indicates that the wireless network card driver has been installed. Otherwise, you must first install the wireless network card driver to continue. 2. Configure/etc/sysconfig/network-scripts/ifcfg-wlan0 my configuration file content is:
1 DEVICE=wlan02 HWADDR=9C:4E:36:9A:64:103 TYPE=Wireless4 UUID=f017bd9c-eebf-46fc-823c-7f76cc8d5abf5 ONBOOT=no6 NM_CONTROLLED=yes7 BOOTPROTO=dhcp8 ESSID="thm"

3. Install wpa_supplicant

1 xxx#yum install wpa_supplicant

4. Configure/etc/wpa_supplicant/wpa_supplicant.conf and write the related ssid and password.

1 xxx#wpa_passphrase thm 12345678 >> /etc/wpa_supplicant/wpa_supplicant.conf

My configuration file content is:

1 ctrl_interface=/var/run/wpa_supplicant2 ctrl_interface_group=wheel3 4 network={5                 ssid="thm"6                 #psk="12345678"7                 psk=eabb3e1572789c41a1600051b1235e03c0787c88fc527f6597cd29cb5a707822

5. Run the wpa_supplicant process in the background

1 xxx#wpa_supplicant -B -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

6. Search for Wireless Networks

1 xxx#iwlist wlan0 scan | grep ESSID

7. Connect to the wireless network

1 xxx#iwconfig wlan0 essid "thm"

8. Obtain the ip address through dhcp

1 xxx#dhclient wlan0

9. Test network connectivity

1 xxx#ping www.baidu.com

Related Article

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.