CentOS-6.4 Wireless Internet command line configuration

Source: Internet
Author: User
Tags centos

The SSID of the WiFi to be connected is "tHM", the password is 12345678, the authentication method is WPA2-PSK

1. Check whether the wireless network card driver is installed

1 xxx#iwconfig

If you print wlan0 (or other name) of the wireless network card information, it indicates that the wireless network card driver has been installed, or to install the wireless network card driver can continue.

2. Configure/etc/sysconfig/network-scripts/ifcfg-wlan0

The contents of my configuration file are:

1 device=wlan0

2 Hwaddr=9c:4e:36:9a:64:10

3 type=wireless

4 UUID=F017BD9C-EEBF-46FC-823C-7F76CC8D5ABF

5 Onboot=no

6 Nm_controlled=yes

7 BOOTPROTO=DHCP

8 essid= "tHM"

3. Installation Tools Wpa_supplicant

1 Xxx#yum Install Wpa_supplicant

4. Configure/etc/wpa_supplicant/wpa_supplicant.conf, write related SSID and corresponding password

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

The contents of my configuration file are:

1 ctrl_interface=/var/run/wpa_supplicant

2 Ctrl_interface_group=wheel

3

4 network={

5 ssid= "tHM"

6 #psk = "12345678"

7 psk=eabb3e1572789c41a1600051b1235e03c0787c88fc527f6597cd29cb5a707822

5. Background Run wpa_supplicant process

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. DHCP Way to obtain IP

1 xxx#dhclient wlan0

9. Test whether the network Unicom

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.