CentOS6.4無線上網命令列配置

來源:互聯網
上載者:User

CentOS6.4無線上網命令列配置
參考:http://www.vfeelit.com/504.html待串連的WIFI的ssid為“thm”,密碼為12345678,認證方式為WPA2-PSK1. 檢查無線網卡驅動是否安裝

1 xxx#iwconfig
若列印wlan0(或其他名字)的無線網卡資訊,則表明無線網卡驅動已經安裝,否則要先安裝無線網卡驅動方能繼續。2. 配置/etc/sysconfig/network-scripts/ifcfg-wlan0我的設定檔內容為:
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. 安裝工具wpa_supplicant

1 xxx#yum install wpa_supplicant

4. 配置/etc/wpa_supplicant/wpa_supplicant.conf,寫入相關ssid和對應的密碼

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

我的設定檔內容為:

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

5. 後台運行wpa_supplicant進程

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

6. 搜尋無線網路

1 xxx#iwlist wlan0 scan | grep ESSID

7. 串連無線網路

1 xxx#iwconfig wlan0 essid "thm"

8. dhcp方式擷取ip

1 xxx#dhclient wlan0

9. 測試網路是否聯通

1 xxx#ping www.baidu.com

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.