{"id":359,"date":"2025-12-01T09:44:06","date_gmt":"2025-12-01T01:44:06","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=359"},"modified":"2025-12-01T09:44:06","modified_gmt":"2025-12-01T01:44:06","slug":"linux%e7%bd%91%e7%bb%9c%e9%80%82%e9%85%8d%e5%99%a8%e4%b8%8d%e8%a7%81%e4%ba%86linux","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/01\/linux%e7%bd%91%e7%bb%9c%e9%80%82%e9%85%8d%e5%99%a8%e4%b8%8d%e8%a7%81%e4%ba%86linux\/","title":{"rendered":"Linux\u7f51\u7edc\u9002\u914d\u5668\u4e0d\u89c1\u4e86,linux"},"content":{"rendered":"\n<p>\u4e0b\u9762\u7ed9\u4f60\u4e00\u4efd<strong>\u6700\u5b9e\u7528\u3001\u4e00\u6b65\u5230\u4f4d\u7684 Linux \u7f51\u5361\/\u7f51\u7edc\u9002\u914d\u5668\u6d88\u5931\u6392\u67e5\u6307\u5357<\/strong>\uff0c\u9002\u5408 CentOS \/ Ubuntu \/ Debian \/ Rocky \/ Alma \u7b49\u5e38\u89c1\u53d1\u884c\u7248\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udee0 Linux \u7f51\u7edc\u9002\u914d\u5668\u4e0d\u89c1\u4e86\uff1f\u6309\u4e0b\u9762\u6b65\u9aa4\u4f9d\u6b21\u6392\u67e5<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 <strong>1. \u67e5\u770b\u7cfb\u7edf\u662f\u5426\u8fd8\u80fd\u8bc6\u522b\u5230\u7f51\u5361\u786c\u4ef6<\/strong><\/h2>\n\n\n\n<p>\u5148\u786e\u8ba4\u786c\u4ef6\u662f\u5426\u5b58\u5728\uff08\u6700\u5173\u952e\u7684\u4e00\u6b65\uff09\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\uff081\uff09\u5217\u51fa\u6240\u6709\u7f51\u7edc\u8bbe\u5907<\/strong><\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nip link\n\n<\/pre><\/div>\n\n\n<p>\u5982\u679c\u8fde <code>eth0<\/code> \/ <code>ens33<\/code> \/ <code>enp0s3<\/code> \u7b49\u90fd\u6ca1\u6709 \u2192 \u7f51\u5361\u53ef\u80fd\u672a\u52a0\u8f7d\u6216\u9a71\u52a8\u6ca1\u88c5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\uff082\uff09\u67e5\u770b\u5185\u6838\u662f\u5426\u8bc6\u522b\u7f51\u5361\u786c\u4ef6<\/strong><\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlspci | grep -i ethernet\n\n<\/pre><\/div>\n\n\n<p>\u82e5\u6ca1\u6709\u4efb\u4f55\u300cEthernet Controller\u300d\u8f93\u51fa \u2192 \u771f\u786c\u4ef6\u6ca1\u88ab\u8bc6\u522b\uff08\u865a\u62df\u673a\u4e5f\u4f1a\u51fa\u73b0\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\uff083\uff09\u67e5\u770b USB \u7f51\u5361\uff08\u82e5\u662f USB\uff09<\/strong><\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlsusb\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 <strong>2. \u67e5\u770b\u9a71\u52a8\u662f\u5426\u52a0\u8f7d<\/strong><\/h2>\n\n\n\n<p>\u4f8b\u5982 Intel\u3001Realtek\u3001VMware\u3001VirtIO \u7f51\u5361\u5e38\u89c1\u9a71\u52a8\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7f51\u5361\u7c7b\u578b<\/th><th>\u9a71\u52a8<\/th><th>\u67e5\u770b\u65b9\u5f0f<\/th><\/tr><\/thead><tbody><tr><td>Intel (82579\/82574)<\/td><td>e1000e<\/td><td>`lsmod<\/td><\/tr><tr><td>Realtek (RTL8168\/8111)<\/td><td>r8169\/r8168<\/td><td>`lsmod<\/td><\/tr><tr><td>VMware<\/td><td>vmxnet3<\/td><td>`lsmod<\/td><\/tr><tr><td>VirtualBox<\/td><td>e1000 \/ virtio-net<\/td><td>`lsmod<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5982\u679c\u9a71\u52a8\u4e0d\u5b58\u5728\uff0c\u53ef\u5c1d\u8bd5\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo modprobe &amp;lt;\u9a71\u52a8\u540d&gt;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 <strong>3. \u67e5\u770b dmesg \u662f\u5426\u62a5\u9519<\/strong><\/h2>\n\n\n\n<p>\u67e5\u627e\u7f51\u5361\u52a0\u8f7d\u9519\u8bef\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndmesg | grep -i eth\ndmesg | grep -i network\n\n<\/pre><\/div>\n\n\n<p>\u5e38\u89c1\u9519\u8bef\u6709\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u201clink down\u201d<\/li>\n\n\n\n<li>\u201cdevice not found\u201d<\/li>\n\n\n\n<li>\u201cfirmware missing\u201d<\/li>\n\n\n\n<li>\u201cr8169: unable to load firmware\u201d<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 <strong>4. NetworkManager \u662f\u5426\u628a\u7f51\u5361\u7981\u7528\u4e86\uff1f<\/strong><\/h2>\n\n\n\n<p>\u68c0\u67e5\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnmcli device\n\n<\/pre><\/div>\n\n\n<p>\u5982\u679c\u770b\u5230\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\u72b6\u6001\uff1aunavailable \/ disconnected\n\n<\/pre><\/div>\n\n\n<p>\u5c1d\u8bd5\u91cd\u542f\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl restart NetworkManager\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 <strong>5. \u7f51\u5361\u63a5\u53e3\u540d\u5b57\u88ab\u4fee\u6539\uff0880-persistent-net.rules\uff09<\/strong><\/h2>\n\n\n\n<p>\u5347\u7ea7\u7cfb\u7edf\u540e\u540d\u79f0\u53ef\u80fd\u6539\u6210\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>enp2s0<\/li>\n\n\n\n<li>ens33<\/li>\n\n\n\n<li>enp0s3<\/li>\n<\/ul>\n\n\n\n<p>\u67e5\u770b\u6240\u6709\u63a5\u53e3\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nls \/sys\/class\/net\n\n<\/pre><\/div>\n\n\n<p>\u5982\u679c\u5b58\u5728\u5176\u5b83\u540d\u79f0\u7684\u7f51\u5361 \u2192 \u4f60\u53ea\u9700\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u5230\u6b63\u786e\u540d\u79f0\u5373\u53ef\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 <strong>6. \u914d\u7f6e\u6587\u4ef6\u4e22\u5931 \/ \u5220\u9519<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>CentOS \/ Rocky \/ RHEL \u8def\u5f84<\/strong><\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/sysconfig\/network-scripts\/ifcfg-&amp;lt;\u63a5\u53e3\u540d&gt;\n\n<\/pre><\/div>\n\n\n<p>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355 DHCP \u6587\u4ef6\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nBOOTPROTO=dhcp\nDEVICE=ens33\nONBOOT=yes\nNAME=ens33\nTYPE=Ethernet\n\n<\/pre><\/div>\n\n\n<p>\u7136\u540e\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl restart network\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong>Ubuntu \/ Debian (netplan)<\/strong><\/h3>\n\n\n\n<p>\u914d\u7f6e\u8def\u5f84\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/netplan\/*.yaml\n\n<\/pre><\/div>\n\n\n<p>Minimal DHCP \u914d\u7f6e\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnetwork:\n  version: 2\n  ethernets:\n    ens33:\n      dhcp4: true\n\n<\/pre><\/div>\n\n\n<p>\u5e94\u7528\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo netplan apply\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2757\ufe0f\u865a\u62df\u673a\u7528\u6237\u7279\u522b\u6ce8\u610f\uff08\u6700\u5e38\u89c1\u539f\u56e0\uff09<\/h2>\n\n\n\n<p>\u5982\u679c\u4f60\u7528\u7684\u662f <strong>VMware \/ VirtualBox \/ Hyper-V<\/strong>\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u865a\u62df\u673a\u8bbe\u7f6e\u91cc\u7f51\u5361\u88ab\u5173\u95ed<\/h3>\n\n\n\n<p>\u6253\u5f00\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>VMware\uff1aSettings \u2192 Network Adapter \u2192 \u52fe\u9009 \u201cConnected\u201d<\/li>\n\n\n\n<li>VirtualBox\uff1a\u8bbe\u7f6e \u2192 \u7f51\u7edc \u2192 \u9002\u914d\u5668 1 \u5fc5\u987b\u5f00\u542f<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u6539\u4e86\u7f51\u5361\u7c7b\u578b\u5bfc\u81f4\u9a71\u52a8\u4e22\u5931<\/h3>\n\n\n\n<p>\u5982\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>e1000 \u2192 vmxnet3<\/li>\n\n\n\n<li>virtio-net \u2192 e1000<\/li>\n\n\n\n<li>NAT \u2192 \u6865\u63a5 \u2192 Host-only<\/li>\n<\/ul>\n\n\n\n<p>\u91cd\u65b0\u542f\u52a8\u5373\u53ef\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc \u6700\u540e\u4e00\u6b65\uff1a\u628a\u4f60\u7684\u60c5\u51b5\u544a\u8bc9\u6211<\/h1>\n\n\n\n<p>\u4e3a\u4e86\u66f4\u5feb\u89e3\u51b3\u4f60\u7684\u95ee\u9898\uff0c\u6211\u9700\u8981\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n\n\n\n<p>\u8bf7\u590d\u5236\u5e76\u7c98\u8d34\u4e0b\u9762\u4e09\u6761\u547d\u4ee4\u7684\u8f93\u51fa\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nip link\nls \/sys\/class\/net\nlspci | grep -i eth\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u9762\u7ed9\u4f60\u4e00\u4efd\u6700\u5b9e\u7528\u3001\u4e00\u6b65\u5230\u4f4d\u7684 Linux \u7f51\u5361\/\u7f51\u7edc\u9002\u914d\u5668\u6d88\u5931\u6392\u67e5\u6307\u5357\uff0c\u9002\u5408 &#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/01\/linux%e7%bd%91%e7%bb%9c%e9%80%82%e9%85%8d%e5%99%a8%e4%b8%8d%e8%a7%81%e4%ba%86linux\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-359","post","type-post","status-publish","format-standard","hentry","category-linux"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":360,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/359\/revisions\/360"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}