CentOS-6.4無線上網命令行配置(zhì)
待連接的WIFI的ssid為(wéi)“thm”,密碼為12345678,認證方式(shì)為WPA2-PSK
1. 檢查無線網卡驅動是(shì)否安裝
1 xxx#iwconfig
若打(dǎ)印wlan0(或其(qí)他名字)的無線網卡信息,則(zé)表(biǎo)明(míng)無線(xiàn)網卡驅動已經安裝,否則要先安裝(zhuāng)無(wú)線網(wǎng)卡驅動方能繼續。
2. 配(pèi)置/etc/sysconfig/network-scripts/ifcfg-wlan0
我的配置文件內容為:
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. 安裝工具wpa_supplicant
1 xxx#yum install wpa_supplicant
4. 配置/etc/wpa_supplicant/wpa_supplicant.conf,寫入(rù)相關ssid和對應的密(mì)碼
1 xxx#wpa_passphrase thm 12345678 >> /etc/wpa_supplicant/wpa_supplicant.conf
我的配置(zhì)文件內容為:
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. 後台(tái)運行wpa_supplicant進(jìn)程
1 xxx#wpa_supplicant -B -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
6. 搜索無線網絡
1 xxx#iwlist wlan0 scan | grep ESSID
7. 連(lián)接無線網絡
1 xxx#iwconfig wlan0 essid "thm"
8. dhcp方式獲取ip
1 xxx#dhclient wlan0
9. 測試網(wǎng)絡(luò)是否(fǒu)聯通
1 xxx#ping www.baidu.com
關鍵詞:CentOS,無線上網(wǎng)
閱(yuè)讀本文後您有(yǒu)什麽感想? 已有 人給出(chū)評(píng)價!
- 0
- 0
- 0
- 0
- 0
- 0