{"id":9549,"date":"2022-03-02T13:32:52","date_gmt":"2022-03-02T05:32:52","guid":{"rendered":"https:\/\/blog.hoyo.idv.tw\/?p=9549"},"modified":"2022-03-02T13:32:52","modified_gmt":"2022-03-02T05:32:52","slug":"ubuntu-usb-wifi","status":"publish","type":"post","link":"https:\/\/blog.hoyo.idv.tw\/?p=9549","title":{"rendered":"Ubuntu - USB WiFi"},"content":{"rendered":"<p>--<\/p>\n<h2>\u53c3\u8003\u8cc7\u6e90<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.mxp.tw\/9102\/\" target=\"_blank\" rel=\"noopener\">[Ubuntu] \u7d42\u7aef\u6a5f\u6307\u4ee4\u4e0b\u555f\u7528 WLAN0 \u7121\u7dda\u7db2\u8def\u529f\u80fd<\/a><\/li>\n<li><a href=\"http:\/\/inpega.blogspot.com\/2015\/09\/iw.html\" target=\"_blank\" rel=\"noopener\">iw\u6307\u4ee4\u9023\u7dda\u64cd\u4f5c\u8a18\u9304<\/a><\/li>\n<li><a href=\"http:\/\/picassosfantasyworld.blogspot.com\/\" target=\"_blank\" rel=\"noopener\">Linux\u7684wpa_passphrase\u6307\u4ee4<\/a><\/li>\n<\/ul>\n<p>--<\/p>\n<p>\u555f\u52d5 USB WiFi<\/p>\n<pre class=\"lang:default decode:true\"># ip link set wlan0 up<\/pre>\n<p>\u6383\u63cf AP<\/p>\n<pre class=\"lang:default decode:true\"># iw wlan0 scan<\/pre>\n<p>\u5b89\u88dd wpa_supplicant \u5be6\u73fe WPA \u8a8d\u8b49<\/p>\n<pre class=\"lang:default decode:true\"># apt install wpasupplicant<\/pre>\n<p>\u6383\u63cf\u53ef\u9023\u63a5 SSID<\/p>\n<pre class=\"lang:default decode:true\"># iw wlan0 scan | grep SSID<\/pre>\n<p>\u6383\u63cf SSID \u52a0\u4e0a\u8a0a\u865f\u5f37\u5ea6<\/p>\n<ul>\n<li><a href=\"https:\/\/linuxize.com\/post\/grep-multiple-patterns\/\" target=\"_blank\" rel=\"noopener\">How to Grep for Multiple Strings and Patterns<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\"># iw wlan0 scan | grep 'SSID\\|signal'\r\n# iw wlan0 scan | grep -E 'SSID|signal'<\/pre>\n<p>\u7522\u751f\u9023\u7dda\u6587\u4ef6\uff0c\u4e0d\u52a0\u5bc6\u78bc Enter \u5f8c\u8f38\u5165<\/p>\n<pre class=\"lang:default decode:true\"># wpa_passphrase SSID Password &gt; \/tmp\/wifi.cnf<\/pre>\n<p>\u9023\u63a5 AP<\/p>\n<pre class=\"lang:default decode:true\"># wpa_supplicant -B -i wlan0 -c \/tmp\/wifi.cnf<\/pre>\n<p>\u78ba\u8a8d\u9023\u63a5\u72c0\u614b<\/p>\n<pre class=\"lang:default decode:true\"># iw wlan0 link<\/pre>\n<p>\u53d6\u5f97 DHCP IP<\/p>\n<pre class=\"lang:default decode:true\"># dhclient wlan0<\/pre>\n<p>--<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"9549\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,051&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>-- \u53c3\u8003\u8cc7\u6e90 [Ubuntu...<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"9549\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,051&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/9549"}],"collection":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9549"}],"version-history":[{"count":5,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/9549\/revisions"}],"predecessor-version":[{"id":9619,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/9549\/revisions\/9619"}],"wp:attachment":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}