{"id":253739,"date":"2022-10-08T10:07:32","date_gmt":"2022-10-08T02:07:32","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=253739"},"modified":"2022-09-28T11:08:27","modified_gmt":"2022-09-28T03:08:27","slug":"arch-linux-wifi-2","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/arch-linux-wifi-2.html","title":{"rendered":"\u5728 Arch Linux \u548c\u5176\u4ed6\u53d1\u884c\u7248\u4e2d\u4f7f\u7528\u7ec8\u7aef\u8fde\u63a5\u5230 WiFi"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u672c\u5feb\u901f\u6307\u5357\u4ecb\u7ecd\u4e86\u5728 Arch Linux \u548c\u5176\u4ed6\u53d1\u884c\u7248\u4e2d\u4f7f\u7528\u7ec8\u7aef\u8bbe\u7f6e\u548c\u8fde\u63a5 WiFi \u6240\u9700\u7684\u6b65\u9aa4\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u672c\u6307\u5357\u975e\u5e38\u9002\u5408\u6ca1\u6709 GUI \u53ea\u6709\u7ec8\u7aef\u4e14\u6ca1\u6709\u5176\u4ed6\u6709\u7ebf\u4e92\u8054\u7f51\u8fde\u63a5\u53ef\u7528\u7684\u60c5\u51b5\u3002\u8fd9\u4e9b\u6b65\u9aa4\u53ef\u5e2e\u52a9\u4f60\u624b\u52a8\u68c0\u6d4b\u65e0\u7ebf\u7f51\u5361\u548c\u8bbe\u5907\uff0c\u5e76\u901a\u8fc7\u7ec8\u7aef\u5bc6\u7801\u9a8c\u8bc1\u8fde\u63a5\u5230 WiFi \u70ed\u70b9\u3002<\/p>\n

\u672c\u6307\u5357\u4f7f\u7528 \u200b\u200biwd\u200b\u200b\uff08Net Wireless Daemon\uff09\u901a\u8fc7\u7ec8\u7aef\u8fde\u63a5\u5230 WiFi\u3002<\/p>\n

\u5728 Arch Linux \u548c\u5176\u4ed6\u53d1\u884c\u7248\u4e2d\u4f7f\u7528\u7ec8\u7aef\u8fde\u63a5\u5230 WiFi<\/p>\n

1\u3001\u8bbe\u7f6e iwd<\/strong><\/div>\n

\u200b\u200biwd\u200b\u200b \u5305\u6709\u4e09\u4e2a\u4e3b\u8981\u6a21\u5757\uff1a<\/p>\n

    \n
  • iwctl\u200b\u200b\uff1a\u65e0\u7ebf\u5ba2\u6237\u7aef<\/li>\n
  • \u200b\u200biwd\u200b\u200b\uff1a\u5b88\u62a4\u8fdb\u7a0b<\/li>\n
  • \u200b\u200biwmon\u200b\u200b\uff1a\u76d1\u63a7\u5de5\u5177<\/li>\n
  • \u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\uff1a<\/li>\n<\/ul>\n
    iwctl<\/pre>\n

    \"\"
    \niwctl \u63d0\u793a\u7b26<\/p>\n

    iwctl \u63d0\u793a\u7b26<\/p>\n

    \u5982\u679c\u627e\u4e0d\u5230\u8be5\u547d\u4ee4\uff0c\u90a3\u4e48\u9700\u8981\u4ece \u200b\u200b\u6b64\u5904\u200b\u200b \u4e0b\u8f7d\u5b89\u88c5\u5305\u3002<\/p>\n

    \u4ece\u4efb\u4f55\u5176\u4ed6\u5177\u6709\u4e92\u8054\u7f51\u8fde\u63a5\u7684\u7cfb\u7edf\/\u7b14\u8bb0\u672c\u7535\u8111\u83b7\u53d6\u5e2e\u52a9\uff0c\u4ee5\u901a\u8fc7\u5b89\u88c5 USB \u4e0b\u8f7d\u548c\u5b89\u88c5\u8f6f\u4ef6\u5305\u3002<\/p>\n

    \u6216\u8005\uff0c\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u53ef\u8fde\u63a5\u4e92\u8054\u7f51\u7684 USB \u7f51\u5361\uff0c\u90a3\u4e48\u5c06\u5176\u63d2\u5165\u4f60\u7684\u7cfb\u7edf\u3002\u5e76\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u3002<\/p>\n

    USB \u7f51\u5361\u5e94\u8be5\u53ef\u4ee5\u5728 Arch \u548c\u5f53\u4eca\u5927\u591a\u6570 Linux \u7cfb\u7edf\u4e2d\u5f00\u7bb1\u5373\u7528\uff0c\u8fde\u63a5\u5230\u4e92\u8054\u7f51\u3002<\/p>\n

    Arch\uff1a<\/p>\n

    pacman -S iwd<\/pre>\n

    Debian\u3001Ubuntu \u548c\u5176\u4ed6\u7c7b\u4f3c\u53d1\u884c\u7248\uff1a<\/p>\n

    sudo apt-get install iwd<\/pre>\n

    Fedora\uff1a<\/p>\n

    sudo dnf install iwd<\/pre>\n

    \u5982\u679c\u4f60\u770b\u5230\u4e86 \u200b\u200biwctl\u200b\u200b \u63d0\u793a\u7b26\uff08\u5982\u4e0b\u6240\u793a\uff09\uff0c\u90a3\u4e48\u7ee7\u7eed\u4e0b\u4e00\u6b65\u3002<\/p>\n

    2\u3001\u914d\u7f6e<\/strong><\/div>\n

    \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u83b7\u53d6\u7cfb\u7edf\u7684\u65e0\u7ebf\u8bbe\u5907\u540d\u79f0\u3002<\/p>\n

    device list<\/pre>\n

    iwctl \u2013 \u8bbe\u5907\u5217\u8868<\/p>\n

    iwctl \u2013 \u8bbe\u5907\u5217\u8868
    \n\"\"
    \n\u8981\u83b7\u53d6 WiFi \u7f51\u7edc\u5217\u8868\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u3002\u5728\u4ee5\u4e0b\u547d\u4ee4\u548c\u6240\u6709\u5176\u4ed6\u547d\u4ee4\u4e2d\u5c06 \u200b\u200bwlan0\u200b\u200b \u66ff\u6362\u4e3a\u4f60\u7684\u8bbe\u5907\u540d\u79f0\u3002<\/p>\n

    station wlan0 get-networks<\/pre>\n

    \"\"
    \niwctl \u2013 \u53ef\u7528\u7f51\u7edc<\/p>\n

    iwctl \u2013 \u53ef\u7528\u7f51\u7edc<\/p>\n

    \u8be5\u547d\u4ee4\u4e3a\u4f60\u63d0\u4f9b\u5177\u6709\u5b89\u5168\u7c7b\u578b\u548c\u4fe1\u53f7\u5f3a\u5ea6\u7684\u53ef\u7528 WiFi \u7f51\u7edc\u5217\u8868\u3002<\/p>\n

    3\u3001\u8fde\u63a5<\/strong><\/div>\n

    \u8981\u8fde\u63a5\u5230 WiFi \u7f51\u7edc\uff0c\u8bf7\u4f7f\u7528\u4e0a\u8ff0 \u200b\u200bget-networks\u200b\u200b \u547d\u4ee4\u4e2d\u7684 WiFi \u63a5\u5165\u70b9\u540d\u79f0\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u3002<\/p>\n

    station wlan0 connect<\/pre>\n

    \u51fa\u73b0\u63d0\u793a\u65f6\u8f93\u5165\u4f60\u7684 WiFi \u5bc6\u7801\u3002
    \n\"\"
    \n\u4f7f\u7528 iwctl \u8fde\u63a5\u5230 WiFi<\/p>\n

    \u4f7f\u7528 iwctl \u8fde\u63a5\u5230 WiFi<\/p>\n

    \u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u4f60\u73b0\u5728\u53ef\u4ee5\u8fde\u63a5\u5230\u4e92\u8054\u7f51\u3002<\/p>\n

    \u4f7f\u7528\u6307\u5357
    \n\u5982\u4e0b\u6240\u793a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684 \u200b\u200bping\u200b\u200b\u200b \u547d\u4ee4\u68c0\u67e5\u8fde\u63a5\u3002\u200b\u200bping\u200b\u200b \u56de\u590d\u6210\u529f\u7684\u6570\u636e\u5305\u4f20\u8f93\u8868\u793a\u8fde\u63a5\u7a33\u5b9a\u3002<\/p>\n

    ping -c 3 google.com<\/pre>\n

    \u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u8fde\u63a5\u72b6\u6001\u3002<\/p>\n

    station wlan0 show<\/pre>\n

    \u200b\u200biwd\u200b\u200b\u200b \u5728 \u200b\u200b\/var\/lib\/iwd\u200b\u200b\u200b \u4e2d\u4fdd\u5b58 \u200b\u200b.psk\u200b\u200b \u540e\u7f00\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5176\u4e2d\u5e26\u6709\u4f60\u7684\u63a5\u5165\u70b9\u540d\u79f0\u3002\u6b64\u6587\u4ef6\u5305\u542b\u4f7f\u7528\u4f60\u7684 WiFi \u7f51\u7edc\u7684\u5bc6\u7801\u548c SSID \u751f\u6210\u7684\u54c8\u5e0c\u6587\u4ef6\u3002<\/p>\n

    \u6309 \u200b\u200bCTRL+D\u200b\u200b\u200b \u9000\u51fa \u200b\u200biwctl\u200b\u200b \u63d0\u793a\u7b26\u3002<\/p>\n

    \u603b\u7ed3<\/strong><\/div>\n

    \u6211\u5e0c\u671b\u672c\u6307\u5357\u53ef\u4ee5\u5e2e\u52a9\u4f60\u901a\u8fc7\u7ec8\u7aef\u8fde\u63a5\u5230\u4e92\u8054\u7f51\u3002\u5f53\u4f60\u6ca1\u6709\u5176\u4ed6\u65b9\u5f0f\u8fde\u63a5\u5230 WiFi \u65f6\uff0c\u8fd9\u4f1a\u6709\u6240\u5e2e\u52a9\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u5728\u72ec\u7acb\u7cfb\u7edf\uff08\u4e0d\u662f VM\uff09\u4e2d\u5b89\u88c5 Arch Linux\uff0c\u90a3\u4e48\u9700\u8981\u8fde\u63a5\u5230\u4e92\u8054\u7f51\u4ee5\u901a\u8fc7\u7ec8\u7aef\u4f7f\u7528 \u200b\u200bpacman\u200b\u200b \u4e0b\u8f7d\u8f6f\u4ef6\u5305\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

    \u672c\u6307\u5357\u975e\u5e38\u9002\u5408\u6ca1\u6709 GUI \u53ea\u6709\u7ec8\u7aef\u4e14\u6ca1\u6709\u5176\u4ed6\u6709\u7ebf\u4e92\u8054\u7f51\u8fde\u63a5\u53ef\u7528\u7684\u60c5\u51b5\u3002\u8fd9\u4e9b\u6b65\u9aa4\u53ef\u5e2e\u52a9\u4f60\u624b\u52a8\u68c0\u6d4b\u65e0\u7ebf\u7f51\u5361\u548c\u8bbe\u5907 […]<\/p>\n","protected":false},"author":1469,"featured_media":253772,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-253739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/253739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1469"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=253739"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/253739\/revisions"}],"predecessor-version":[{"id":254003,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/253739\/revisions\/254003"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/253772"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=253739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=253739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=253739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}