Centos 串連WIFI

來源:互聯網
上載者:User

Centos 串連WIFI

(1) iw dev 查看無線網卡[root@localhost 案頭]# iw devphy#0    Interface wlp4s0        ifindex 3        wdev 0x1        addr 1c:4b:d6:91:83:0a        type managed(2) ip link set *** up 開啟無線網卡[root@localhost 案頭]# ip link set wlp4s0 up(3)ip link show *** 顯示無線網卡的基本資料[root@localhost 案頭]# ip link show wlp4s03: wlp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000    link/ether 1c:4b:d6:91:83:0a brd ff:ff:ff:ff:ff:ff(4) iw *** link 顯示無線網卡串連情況[root@localhost 案頭]# iw wlp4s0 linkNot connected.(5) iw *** scan|grep SSID 查看當前區域網路中無線網路SSID[root@localhost 案頭]# iw wlp4s0 scan|grep SSID    SSID: TP-LINK_AA    SSID: TP-202    SSID: TP-LINK_Allen    SSID: Tenda_zzzz    SSID: \xba\xa3\xd4\xf4\xcd\xf5\xc2\xb7\xb7\xc9    SSID: WIFI123    SSID: MERCURY_435C    SSID: xiaoniu    SSID: Tenda    SSID: xxxxx(6)wpa_supplicant -B -i *** -c<(wpa_passphrase "SSID_XXX" "PWD_XXX") 串連無線網路, SSID_XXX 需要串連的wifi SSID ,PWD_XXX wifi 密碼[root@localhost 案頭]# wpa_supplicant -B -i wlp4s0 -c<(wpa_passphrase "MERCURY_435C" "78787878")Successfully initialized wpa_supplicant(7) dhclient 分配IP[root@localhost 案頭]# dhclient wlp4s0[root@localhost 案頭]# ip addr show wlp4s03: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000    link/ether 1c:4b:d6:91:83:0a brd ff:ff:ff:ff:ff:ff    inet 192.168.1.105/24 brd 192.168.1.255 scope global dynamic wlp4s0       valid_lft 172788sec preferred_lft 172788sec    inet6 fe80::1e4b:d6ff:fe91:830a/64 scope link        valid_lft forever preferred_lft forever串連成功測試:[root@localhost 案頭]# ping baidu.comPING baidu.com (220.181.57.217) 56(84) bytes of data.64 bytes from 220.181.57.217: icmp_seq=1 ttl=51 time=61.0 ms64 bytes from 220.181.57.217: icmp_seq=2 ttl=51 time=43.3 ms^C64 bytes from 220.181.57.217: icmp_seq=3 ttl=51 time=42.5 ms--- baidu.com ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 2000msrtt min/avg/max/mdev = 42.596/48.981/61.035/8.528 ms 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.