{"id":29,"date":"2024-08-20T10:25:22","date_gmt":"2024-08-20T02:25:22","guid":{"rendered":"https:\/\/cnsn.rr.nu\/?p=29"},"modified":"2024-08-20T10:25:22","modified_gmt":"2024-08-20T02:25:22","slug":"debian-%e5%a6%82%e4%bd%95%e4%bf%ae%e6%94%b9%e9%bb%98%e8%ae%a4%e7%bd%91%e5%8d%a1%e4%b8%ba-eth0","status":"publish","type":"post","link":"https:\/\/blog.cnsn.fun\/?p=29","title":{"rendered":"Debian \u5982\u4f55\u4fee\u6539\u9ed8\u8ba4\u7f51\u5361\u4e3a eth0"},"content":{"rendered":"<p><a href=\"https:\/\/www.debian.cn\/tag\/debian\/\">Debian<\/a> \u7cfb\u7edf\u5b89\u88c5\u4ee5\u540e\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7f51\u5361\u8bbe\u5907\u540d\u4e0d\u662f\u5e38\u89c1\u7684 eth0 \u7684\u60c5\u51b5\u3002\u6211\u4eec\u6709\u6ca1\u6709\u529e\u6cd5\u7edf\u4e00\u7f51\u5361\u8bbe\u5907\u540d\u79f0\u5462\uff1f<\/p>\n<p>\u5728\u670d\u52a1\u5668\u73af\u5883\u4e2d\uff0c\u7edf\u4e00\u7f51\u5361\u8bbe\u5907\u540d\u662f\u5f88\u6709\u5fc5\u8981\u7684\u3002\u6807\u51c6\u5316\u7684\u914d\u7f6e\u4f1a\u8282\u7701\u6211\u4eec\u5927\u91cf\u7684\u65f6\u95f4\uff0c\u8fd9\u4e9b\u65f6\u95f4\u53ef\u80fd\u4f1a\u82b1\u5728\u6392\u969c\u3001\u76d1\u63a7\u7684\u914d\u7f6e\u3001\u72b6\u6001\u6536\u96c6\u811a\u672c\u7684\u8c03\u6574\u7b49\u3002<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u4ecb\u7ecd\u5982\u4f55\u628a <a href=\"https:\/\/www.debian.cn\/tag\/debian\/\">Debian<\/a> \u7cfb\u7edf\u4e2d\u7684\u7f51\u5361\u4ece\u975e eth0\uff0c\u8c03\u6574\u4e3a eth0\uff0c\u8fd9\u4e2a\u8bbe\u5907\u540d\u662f\u5404 Linux \u7cfb\u7edf\u4e2d\u6bd4\u8f83\u901a\u7528\u7684\u7f51\u5361\u8bbe\u5907\u540d\u3002\u4e0b\u9762\u6211\u4eec\u4ee5\u8bbe\u5907\u540d ens3 \u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u5728Debian \u7cfb\u7edf\u4e2d\uff0c\u5982\u4f55\u4fee\u6539\u7f51\u5361\u8bbe\u5907\u540d\u4e3a eth0 \u7684\u5177\u4f53\u6b65\u9aa4\u3002<\/p>\n<p>\u9996\u9009\uff0c\u6211\u4eec\u9700\u8981\u7f16\u8f91 grub \u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4fee\u6539\u542f\u52a8\u53c2\u6570\u3002\u4f7f\u7528\u7f16\u8f91\u5668\u6253\u5f00 \/etc\/default\/grub\uff0c \u67e5\u627e\uff1a<\/p>\n<pre><code>GRUB_CMDLINE_LINUX=&quot;&quot;<\/code><\/pre>\n<p>\u627e\u5230\u8fd9\u884c\uff0c\u5e76\u4fee\u6539\u4e3a\uff1a<\/p>\n<pre><code>GRUB_CMDLINE_LINUX=&quot;net.ifnames=0 biosdevname=0&quot;<\/code><\/pre>\n<p>\u4fee\u6539\u540e\u8bb0\u5f97\u4fdd\u5b58\u3002\u968f\u540e\u4fee\u6539\u7f51\u7edc\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u8c03\u6574\u7f51\u5361\u8bbe\u5907\u540d\uff1a<\/p>\n<pre><code> sed -i &#039;s\/ens3\/eth0\/g&#039;  \/etc\/network\/interfaces\n sed -i &#039;s\/enp3s0\/eth0\/g&#039;  \/etc\/network\/interfaces<\/code><\/pre>\n<p>\u6700\u540e\u91cd\u65b0\u751f\u6210 grub \u5f15\u5bfc\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u91cd\u542f\u7cfb\u7edf\u3002<\/p>\n<pre><code>`grub-mkconfig -o \/boot\/grub\/grub.cfg`<\/code><\/pre>\n<p>Grub \u7684\u914d\u7f6e\u66f4\u65b0\u540e\uff0c\u9700\u8981\u91cd\u542f\u7cfb\u7edf\u751f\u6548\u3002\u7cfb\u7edf\u91cd\u542f\u540e\uff0c\u7f51\u5361\u7684\u540d\u5b57\u4fbf\u66f4\u65b0\u4e3a eth0 \u4e86\u3002\u5982\u679c\u9047\u5230\u95ee\u9898\uff0c\u6b22\u8fce\u7559\u8a00\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian \u7cfb\u7edf\u5b89\u88c5\u4ee5\u540e\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7f51\u5361\u8bbe\u5907\u540d\u4e0d\u662f\u5e38\u89c1\u7684 eth0 \u7684\u60c5\u51b5\u3002\u6211\u4eec\u6709\u6ca1\u6709\u529e\u6cd5\u7edf\u4e00\u7f51\u5361\u8bbe\u5907\u540d\u79f0\u5462 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[15,19],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-linux","tag-debian","tag-linux"],"_links":{"self":[{"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29"}],"version-history":[{"count":0,"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=\/wp\/v2\/posts\/29\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cnsn.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}