{"id":247177,"date":"2022-07-21T09:36:26","date_gmt":"2022-07-21T01:36:26","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=247177"},"modified":"2022-07-12T12:36:57","modified_gmt":"2022-07-12T04:36:57","slug":"find-router-ip-address-in-linux","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/find-router-ip-address-in-linux.html","title":{"rendered":"Linux\u4e2d\u5bfb\u627e\u8def\u7531\u5668IP\u5730\u5740"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5982\u679c\u4f60\u9700\u8981\u6539\u53d8\u4f60\u7684 Wi-Fi\/\u7f51\u7edc\u7684 SSID\u3001\u5bc6\u7801\u6216\u5176\u4ed6\u914d\u7f6e\uff0c\u4f60\u5fc5\u987b\u8fde\u63a5\u5230\u5b83\u3002\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u5728\u7f51\u9875\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u8def\u7531\u5668\u7684 IP \u5730\u5740\uff0c\u7136\u540e\u4f7f\u7528\u8def\u7531\u5668\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u4f60\u53ef\u80fd\u5df2\u7ecf\u77e5\u9053\u5982\u4f55\u5728 Linux \u4e2d\u83b7\u5f97\u4f60\u7684\u7cfb\u7edf\u7684 IP \u5730\u5740\u3002\u4f46\u662f\u4f60\u600e\u4e48\u77e5\u9053\u4f60\u7684\u8def\u7531\u5668\u7684 IP \u5730\u5740\u5462\uff1f\u6211\u8bf4\u7684\u4e0d\u662f\u4f60\u53ef\u4ee5\u901a\u8fc7\u8fde\u63a5\u5230 \u201c\u200b\u200bShow My IP\u200b\u200b\u200b\u201d \u8fd9\u6837\u7684\u7f51\u7ad9\u6216\u7b80\u5355\u5730\u5728 \u200b\u200bDuckDuckGo\u200b\u200b\u200b \u4e2d \u200b\u200b\u641c\u7d22\u201cwhat is my ip\u201d\u200b\u200b \u83b7\u5f97\u7684\u516c\u7f51 IP\u3002\u6211\u8bf4\u7684\u662f\u9ed8\u8ba4\u7f51\u5173 IP\uff0c\u4f60\u7684 Linux \u684c\u9762\u6240\u8fde\u63a5\u7684\u5730\u5740\u3002\u4f60\u4e3a\u4ec0\u4e48\u9700\u8981\u5b83\uff1f\u55ef\uff0c\u5982\u679c\u4f60\u9700\u8981\u6539\u53d8\u4f60\u7684 Wi-Fi\/\u7f51\u7edc\u7684 SSID\u3001\u5bc6\u7801\u6216\u5176\u4ed6\u914d\u7f6e\uff0c\u4f60\u5fc5\u987b\u8fde\u63a5\u5230\u5b83\u3002\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u5728\u7f51\u9875\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u8def\u7531\u5668\u7684 IP \u5730\u5740\uff0c\u7136\u540e\u4f7f\u7528\u8def\u7531\u5668\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/p>\n

\u867d\u7136\u6211\u4e0d\u80fd\u5e2e\u52a9\u4f60\u83b7\u5f97\u8def\u7531\u5668\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u4f46\u6211\u80af\u5b9a\u53ef\u4ee5\u544a\u8bc9\u4f60\u5982\u4f55\u83b7\u5f97\u5b83\u7684 IP\u3002\u4e00\u5982\u65e2\u5f80\uff0c\u6211\u5c06\u5c55\u793a GUI \u548c\u547d\u4ee4\u884c\u4e24\u79cd\u65b9\u6cd5\u3002<\/p>\n

\u5728 Linux \u4e2d\u4f7f\u7528 GUI \u83b7\u53d6\u8def\u7531\u5668\u7684 IP \u5730\u5740<\/strong><\/div>\n

\u8fd9\u5176\u5b9e\u5f88\u7b80\u5355\u3002\u6211\u5728\u8fd9\u91cc\u4f7f\u7528\u7684\u662f Ubuntu \u7684 GNOME \u684c\u9762\u3002\u5982\u679c\u4f60\u4f7f\u7528\u4e00\u4e9b \u200b\u200b\u5176\u4ed6\u684c\u9762\u73af\u5883\u200b\u200b\uff0c\u622a\u56fe\u53ef\u80fd\u4f1a\u6709\u6240\u4e0d\u540c\u3002<\/p>\n

\u6253\u5f00\u201c\u7cfb\u7edf\u8bbe\u7f6eSystem Settings\u201d\uff1a<\/p>\n

\"\"<\/p>\n

\u73b0\u5728\u8fdb\u5165 Wi-Fi \u6216\u201c\u7f51\u7edcNetwork\u201d\uff08\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f\u6709\u7ebf\u7684\u4ee5\u592a\u7f51\u8fde\u63a5\uff09\u3002\u5728\u8fd9\u91cc\uff0c\u70b9\u51fb\u4f60\u5f53\u524d\u4f7f\u7528\u7684\u7f51\u7edc\u65c1\u8fb9\u7684\u5c0f\u8bbe\u7f6e\u7b26\u53f7\u3002<\/p>\n

\"\"<\/p>\n

\u5b83\u5c06\u6253\u5f00\u4e00\u4e2a\u65b0\u7a97\u53e3\uff0c\u91cc\u9762\u6709\u5173\u4e8e\u4f60\u7684\u8fde\u63a5\u7684\u4e00\u4e9b\u7ec6\u8282\uff0c\u5982 IP \u5730\u5740\u3001DNS \u548c \u200b\u200bMac \u5730\u5740\u200b\u200b\u200b\u3002\u4f60\u8fd8\u53ef\u4ee5\u5728\u201c\u5b89\u5168security\u201d\u6807\u7b7e\u4e0b\u770b\u5230 \u200b\u200b\u4fdd\u5b58\u7684 Wi-Fi \u5bc6\u7801\u200b\u200b\u3002<\/p>\n

\u4f60\u8fd8\u4f1a\u770b\u5230\u4e00\u4e2a\u540d\u4e3a\u201c\u9ed8\u8ba4\u8def\u7531Default Route\u201d\u7684\u6761\u76ee\u3002\u8fd9\u5c31\u662f\u4f60\u8981\u627e\u7684\u4e1c\u897f\u3002\u4f60\u7684\u8def\u7531\u5668\u7684 IP \u5730\u5740\u3002<\/p>\n

\"\"<\/p>\n

\u4f60\u7684\u7cfb\u7edf\u548c\u7f51\u7edc\u4e0a\u7684\u6240\u6709\u5176\u4ed6\u8bbe\u5907\u90fd\u4f7f\u7528\u8fd9\u4e2a IP \u5730\u5740\u8fde\u63a5\u5230\u8def\u7531\u5668\u3002\u8fd9\u5c31\u662f\u5927\u591a\u6570\u5bb6\u5ead\u7684\u8bbe\u7f6e\u3002<\/p>\n

\u73b0\u5728\u6211\u5df2\u7ecf\u5c55\u793a\u4e86 GUI \u7684\u65b9\u6cd5\uff0c\u8ba9\u6211\u4eec\u53bb\u770b\u770b\u7ec8\u7aef\u7684\u8def\u7ebf\u3002<\/p>\n

\u5728 Linux \u547d\u4ee4\u884c\u4e2d\u83b7\u53d6\u8def\u7531\u5668\u7684 IP \u5730\u5740<\/strong><\/div>\n

\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\r\n    ip route\r\n<\/pre>\n

\u5b83\u5c06\u663e\u793a\u51e0\u4e2a\u6761\u76ee\u3002<\/p>\n

\r\n    ~$ ip route\r\n    default via 192.168.1.1 dev wlp0s20f3 proto dhcp metric 600 \r\n    169.254.0.0\/16 dev wlp0s20f3 scope link metric 1000 \r\n    192.168.1.0\/24 dev wlp0s20f3 proto kernel scope link src 192.168.1.34 metric 600\r\n<\/pre>\n

\u7b2c\u4e00\u884c\uff0c\u4ee5 \u200b\u200bdefault via\u200b\u200b \u5f00\u5934\uff0c\u7ed9\u51fa\u4e86\u4f60\u7f51\u5173\u7684 IP\u3002\u8fd9\u662f\u4f60\u7684\u8def\u7531\u5668\u7684 IP \u5730\u5740\u3002<\/p>\n

\"\"<\/p>\n

\u4f60\u53ef\u4ee5\u770b\u5230\uff0c\u200b\u200b192.168.1.1\u200b\u200b\u200b \u662f\u6211\u7684\u8def\u7531\u5668\u7684 IP \u5730\u5740\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8def\u7531\u5668\u7684 IP \u5730\u5740\u662f\u5b50\u7f51\u7684\u7b2c\u4e00\u4e2a\u6570\u5b57\u3002\u7136\u800c\uff0c\u8fd9\u5e76\u4e0d\u662f\u4e00\u4e2a\u786c\u6027\u89c4\u5b9a\u3002\u6211\u4e5f\u89c1\u8fc7\u6709 \u200b\u200bx.y.z.30\u200b\u200b \u5730\u5740\u7684\u8def\u7531\u5668\u3002<\/p>\n

\u989d\u5916\u6280\u5de7<\/strong><\/span><\/div>\n

\u6b63\u5982 Samir \u5728\u8bc4\u8bba\u4e2d\u6240\u5206\u4eab\u7684\uff0c\u4f60\u4e5f\u53ef\u4ee5\uff08\u5728 Debian \u4e0a\uff09\u4f7f\u7528 \u200b\u200bping\u200b\u200b \u547d\u4ee4\u6765\u83b7\u5f97\u7f51\u5173 IP\uff1a<\/p>\n

\r\n    ping _gateway\r\n<\/pre>\n

\"\"<\/p>\n

\u4ee5\u9632\u4f60\u4e0d\u77e5\u9053\uff0c\u4f60\u5fc5\u987b \u200b\u200b\u5728 Linux \u4e2d\u4f7f\u7528 Ctrl+C \u6765\u505c\u6b62\u4e00\u4e2a\u6b63\u5728\u8fd0\u884c\u7684\u547d\u4ee4\u200b\u200b\u3002<\/p>\n

\u6211\u5e0c\u671b\u4f60\u5728\u9700\u8981\u7684\u65f6\u5019\u80fd\u53d1\u73b0\u8fd9\u4e2a\u6280\u5de7\u662f\u6709\u7528\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4f60\u53ef\u80fd\u5df2\u7ecf\u77e5\u9053\u5982\u4f55\u5728 Linux \u4e2d\u83b7\u5f97\u4f60\u7684\u7cfb\u7edf\u7684 IP \u5730\u5740\u3002\u4f46\u662f\u4f60\u600e\u4e48\u77e5\u9053\u4f60\u7684\u8def\u7531\u5668\u7684 IP \u5730\u5740\u5462\uff1f\u6211\u8bf4 […]<\/p>\n","protected":false},"author":1329,"featured_media":247186,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-247177","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\/247177","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\/1329"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=247177"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/247177\/revisions"}],"predecessor-version":[{"id":247452,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/247177\/revisions\/247452"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/247186"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=247177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=247177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=247177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}