{"id":28642,"date":"2025-04-20T02:05:57","date_gmt":"2025-04-19T18:05:57","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/28642.html"},"modified":"2025-04-20T02:05:57","modified_gmt":"2025-04-19T18:05:57","slug":"linux%e6%9f%a5%e7%9c%8b%e8%bf%9b%e7%a8%8b%e4%bd%bf%e7%94%a8%e7%9a%84%e7%ab%af%e5%8f%a3%e5%8f%b7%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/28642.html","title":{"rendered":"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f"},"content":{"rendered":"<p>\u5728 Linux \u7cfb\u7edf\u4e2d&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u547d\u4ee4\u6765\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u670d\u52a1\u5668\u7aef\u53e3\u53f7\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u65b9\u6cd5&#xff1a;<\/p>\n<p><span style=\"color:#ff9900\">ss&#xff08;Socket Statistics&#xff09;\u547d\u4ee4<\/span><\/p>\n<p>\u53c2\u6570\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>-h, &#8211;help&#xff1a;\u663e\u793a\u5e2e\u52a9\u4fe1\u606f\u3002<\/li>\n<li>-V, &#8211;version&#xff1a;\u8f93\u51fa\u7248\u672c\u4fe1\u606f\u3002<\/li>\n<li>-n, &#8211;numeric&#xff1a;\u4e0d\u89e3\u6790\u670d\u52a1\u540d\u79f0\u3002<\/li>\n<li>-r, &#8211;resolve&#xff1a;\u89e3\u6790\u4e3b\u673a\u540d\u3002<\/li>\n<li>-a, &#8211;all&#xff1a;\u663e\u793a\u6240\u6709\u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-l, &#8211;listening&#xff1a;\u663e\u793a\u76d1\u542c\u72b6\u6001\u7684\u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-o, &#8211;options&#xff1a;\u663e\u793a\u8ba1\u65f6\u5668\u4fe1\u606f\u3002<\/li>\n<li>-e, &#8211;extended&#xff1a;\u663e\u793a\u8be6\u7ec6\u7684\u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u4fe1\u606f\u3002<\/li>\n<li>-m, &#8211;memory&#xff1a;\u663e\u793a\u5957\u63a5\u5b57&#xff08;socket&#xff09;\u7684\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u3002<\/li>\n<li>-p, &#8211;processes&#xff1a;\u663e\u793a\u4f7f\u7528\u5957\u63a5\u5b57&#xff08;socket&#xff09;\u7684\u8fdb\u7a0b\u3002<\/li>\n<li>-i, &#8211;info&#xff1a;\u663e\u793a TCP \u5185\u90e8\u4fe1\u606f\u3002<\/li>\n<li>-s, &#8211;summary&#xff1a;\u663e\u793a\u5957\u63a5\u5b57&#xff08;socket&#xff09;\u4f7f\u7528\u6982\u51b5\u3002<\/li>\n<li>-4, &#8211;ipv4&#xff1a;\u4ec5\u663e\u793a IPv4 \u7684\u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-6, &#8211;ipv6&#xff1a;\u4ec5\u663e\u793a IPv6 \u7684\u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-0, &#8211;packet&#xff1a;\u663e\u793a PACKET \u5957\u63a5\u5b57&#xff08;socket&#xff09;\u3002<\/li>\n<li>-t, &#8211;tcp&#xff1a;\u4ec5\u663e\u793a TCP \u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-u, &#8211;udp&#xff1a;\u4ec5\u663e\u793a UDP \u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-d, &#8211;dccp&#xff1a;\u4ec5\u663e\u793a DCCP \u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-w, &#8211;raw&#xff1a;\u4ec5\u663e\u793a RAW \u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-x, &#8211;unix&#xff1a;\u4ec5\u663e\u793a Unix \u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u3002<\/li>\n<li>-f, &#8211;family&#061;FAMILY&#xff1a;\u663e\u793a\u6307\u5b9a\u7c7b\u578b\u7684\u5957\u63a5\u5b57&#xff08;sockets&#xff09;&#xff0c;FAMILY \u53ef\u9009\u7c7b\u578b\u5305\u62ec unix\u3001inet\u3001inet6\u3001link\u3001netlink \u7b49\u3002<\/li>\n<li>-A, &#8211;query&#061;QUERY, &#8211;socket&#061;QUERY&#xff1a;\u67e5\u770b\u67d0\u79cd\u7c7b\u578b\u7684\u5957\u63a5\u5b57&#xff0c;QUERY \u53ef\u4ee5\u662fall\u3001inet\u3001tcp\u3001udp\u3001raw\u3001unix\u3001packet\u3001netlink\u7b49&#xff0c;\u4e5f\u53ef\u4ee5\u662f\u5b83\u4eec\u7684\u7ec4\u5408&#xff0c;\u4f8b\u5982tcp,udp\u3002<\/li>\n<li>-D, &#8211;diag&#061;FILE&#xff1a;\u5c06\u539f\u59cb TCP \u5957\u63a5\u5b57&#xff08;sockets&#xff09;\u4fe1\u606f\u8f6c\u50a8\u5230\u6587\u4ef6\u3002<\/li>\n<li>-F, &#8211;filter&#061;FILE&#xff1a;\u4ece\u6587\u4ef6\u4e2d\u8bfb\u53d6\u8fc7\u6ee4\u4fe1\u606f&#xff0c;\u7528\u4e8e\u8fc7\u6ee4\u67d0\u79cd\u72b6\u6001\u7684\u8fde\u63a5&#xff0c;FILTER \u7684\u683c\u5f0f\u4e3a(state TCP-STATE) (EXPRESSION)\u3002<\/li>\n<\/ul>\n<p><span style=\"color:#ff9900\">netstat\u547d\u4ee4<\/span><\/p>\n<p>\u53c2\u6570\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>-a \u6216 &#8211;all&#xff1a;\u663e\u793a\u6240\u6709\u8fde\u7ebf\u4e2d\u7684 Socket\u3002<\/li>\n<li>-A&lt;\u7f51\u7edc\u7c7b\u578b&gt; \u6216 &#8211;&lt;\u7f51\u7edc\u7c7b\u578b&gt;&#xff1a;\u5217\u51fa\u8be5\u7f51\u7edc\u7c7b\u578b\u8fde\u7ebf\u4e2d\u7684\u76f8\u5173\u5730\u5740\u3002<\/li>\n<li>-c \u6216 &#8211;continuous&#xff1a;\u6301\u7eed\u5217\u51fa\u7f51\u7edc\u72b6\u6001\u3002<\/li>\n<li>-C \u6216 &#8211;cache&#xff1a;\u663e\u793a\u8def\u7531\u5668\u914d\u7f6e\u7684\u5feb\u53d6\u4fe1\u606f\u3002<\/li>\n<li>-e \u6216 &#8211;extend&#xff1a;\u663e\u793a\u7f51\u7edc\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002<\/li>\n<li>-F \u6216 &#8211;fib&#xff1a;\u663e\u793a FIB\u3002<\/li>\n<li>-F \u6216 &#8211;fib&#xff1a;\u663e\u793a FIB\u3002<\/li>\n<li>-g \u6216 &#8211;groups&#xff1a;\u663e\u793a\u591a\u91cd\u5e7f\u64ad\u529f\u80fd\u7fa4\u7ec4\u7ec4\u5458\u540d\u5355\u3002<\/li>\n<li>-h \u6216 &#8211;help&#xff1a;\u5728\u7ebf\u5e2e\u52a9\u3002<\/li>\n<li>-i \u6216 &#8211;interfaces&#xff1a;\u663e\u793a\u7f51\u7edc\u754c\u9762\u4fe1\u606f\u8868\u5355\u3002<\/li>\n<li>-l \u6216 &#8211;listening&#xff1a;\u663e\u793a\u76d1\u63a7\u4e2d\u7684\u670d\u52a1\u5668\u7684 Socket\u3002<\/li>\n<li>-M \u6216 &#8211;masquerade&#xff1a;\u663e\u793a\u4f2a\u88c5\u7684\u7f51\u7edc\u8fde\u7ebf\u3002<\/li>\n<li>-n \u6216 &#8211;numeric&#xff1a;\u76f4\u63a5\u4f7f\u7528 IP \u5730\u5740&#xff0c;\u800c\u4e0d\u901a\u8fc7\u57df\u540d\u670d\u52a1\u5668\u3002<\/li>\n<li>-N \u6216 &#8211;netlink \u6216 &#8211;symbolic&#xff1a;\u663e\u793a\u7f51\u7edc\u786c\u4ef6\u5916\u56f4\u8bbe\u5907\u7684\u7b26\u53f7\u8fde\u63a5\u540d\u79f0\u3002<\/li>\n<li>-o \u6216 &#8211;timers&#xff1a;\u663e\u793a\u8ba1\u65f6\u5668\u3002<\/li>\n<li>-p \u6216 &#8211;programs&#xff1a;\u663e\u793a\u6b63\u5728\u4f7f\u7528 Socket \u7684\u7a0b\u5e8f\u8bc6\u522b\u7801\u548c\u7a0b\u5e8f\u540d\u79f0\u3002<\/li>\n<li>-r \u6216 &#8211;route&#xff1a;\u663e\u793a Routing Table\u3002<\/li>\n<li>-s \u6216 &#8211;statistics&#xff1a;\u6309\u7167\u6bcf\u4e2a\u534f\u8bae\u6765\u5206\u7c7b\u8fdb\u884c\u7edf\u8ba1&#xff0c;\u9ed8\u8ba4\u663e\u793a IP\u3001IPv6\u3001ICMP\u3001ICMPv6\u3001TCP\u3001TCPv6\u3001UDP \u548c UDPv6 \u7684\u7edf\u8ba1\u4fe1\u606f\u3002<\/li>\n<li>-t \u6216 &#8211;tcp&#xff1a;\u663e\u793a TCP \u4f20\u8f93\u534f\u8bae\u7684\u8fde\u7ebf\u72b6\u51b5\u3002<\/li>\n<li>-u \u6216 &#8211;udp&#xff1a;\u663e\u793a UDP \u4f20\u8f93\u534f\u8bae\u7684\u8fde\u7ebf\u72b6\u51b5\u3002<\/li>\n<li>-v \u6216 &#8211;verbose&#xff1a;\u663e\u793a\u6307\u4ee4\u6267\u884c\u8fc7\u7a0b\u3002<\/li>\n<li>-V \u6216 &#8211;version&#xff1a;\u663e\u793a\u7248\u672c\u4fe1\u606f\u3002<\/li>\n<li>-w \u6216 &#8211;raw&#xff1a;\u663e\u793a RAW \u4f20\u8f93\u534f\u8bae\u7684\u8fde\u7ebf\u72b6\u51b5\u3002<\/li>\n<li>-x \u6216 &#8211;unix&#xff1a;\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u6307\u5b9a-A unix\u53c2\u6570\u76f8\u540c\u3002<\/li>\n<li>&#8211;ip \u6216 &#8211;inet&#xff1a;\u6b64\u53c2\u6570\u7684\u6548\u679c\u548c\u6307\u5b9a-A inet\u53c2\u6570\u76f8\u540c\u3002<\/li>\n<\/ul>\n<p><span style=\"color:#ff9900\">lsof&#xff08;list open files&#xff09;\u547d\u4ee4<\/span><\/p>\n<p>\u7528\u4e8e\u67e5\u770b\u7cfb\u7edf\u4e2d\u6253\u5f00\u7684\u6587\u4ef6\u548c\u76f8\u5173\u8fdb\u7a0b\u4fe1\u606f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>\n<p>-a&#xff1a;\u8868\u793a\u4e24\u4e2a\u6216\u591a\u4e2a\u6761\u4ef6\u90fd\u5fc5\u987b\u6ee1\u8db3\u65f6\u624d\u663e\u793a\u7ed3\u679c\u3002\u4f8b\u5982&#xff0c;lsof -a -u root -i tcp\u00a0\u5c06\u5217\u51fa\u5c5e\u4e8e root \u7528\u6237\u4e14\u4f7f\u7528 TCP \u534f\u8bae\u7684\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>-c &lt;\u8fdb\u7a0b\u540d&gt;&#xff1a;\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>-g &lt;GID&gt;&#xff1a;\u5217\u51fa GID \u53f7\u8fdb\u7a0b\u7684\u8be6\u60c5\u3002<\/p>\n<\/li>\n<li>\n<p>-d &lt;\u6587\u4ef6\u63cf\u8ff0\u7b26&gt;&#xff1a;\u5217\u51fa\u5360\u7528\u8be5\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684\u8fdb\u7a0b\u3002\u53ef\u4ee5\u6307\u5b9a\u591a\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff0c;\u5982\u00a0-d 1 -d 2\u3002<\/p>\n<\/li>\n<li>\n<p>-d &lt;\u76ee\u5f55&gt;&#xff1a;\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>&#043;D &lt;\u76ee\u5f55&gt;&#xff1a;\u9012\u5f52\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6&#xff0c;\u4f46\u641c\u7d22\u65f6\u95f4\u76f8\u5bf9\u8f83\u957f\u3002<\/p>\n<\/li>\n<li>\n<p>-n&#xff1a;\u4e0d\u5c06 IP \u8f6c\u6362\u4e3a hostname&#xff0c;\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u8f6c\u6362\u7684\u3002<\/p>\n<\/li>\n<li>\n<p>-i &lt;\u6761\u4ef6&gt;&#xff1a;\u5217\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u8fdb\u7a0b\u3002\u6761\u4ef6\u7684\u683c\u5f0f\u901a\u5e38\u4e3a\u00a0&lt;\u534f\u8bae&gt;:&lt;\u7aef\u53e3&gt;\u00a0\u6216\u00a0&#064;&lt;\u4e3b\u673a\u540d|IP \u5730\u5740&gt;&#xff0c;\u4f8b\u5982\u00a0-i tcp:80\u00a0\u8868\u793a\u5217\u51fa\u4f7f\u7528 TCP \u534f\u8bae\u4e14\u7aef\u53e3\u4e3a 80 \u7684\u8fdb\u7a0b&#xff0c;-i &#064;127.0.0.1\u00a0\u8868\u793a\u5217\u51fa\u4e0e\u672c\u5730\u4e3b\u673a&#xff08;127.0.0.1&#xff09;\u76f8\u5173\u7684\u8fdb\u7a0b\u3002<\/p>\n<\/li>\n<li>\n<p>-p &lt;\u8fdb\u7a0b\u53f7&gt;&#xff1a;\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u53f7\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>-u &lt;\u7528\u6237\u540d&gt;&#xff1a;\u5217\u51fa\u8be5\u7528\u6237\u76f8\u5173\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>-U&#xff1a;\u4ec5\u5217\u51fa\u7cfb\u7edf socket \u6587\u4ef6\u7c7b\u578b\u3002<\/p>\n<\/li>\n<li>\n<p>-h&#xff1a;\u663e\u793a\u5e2e\u52a9\u4fe1\u606f\u3002<\/p>\n<\/li>\n<li>\n<p>-v&#xff1a;\u663e\u793a\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u6848\u4f8b<\/p>\n<p>netstat -tunlp<\/p>\n<p>ss -tunlp<\/p>\n<p>\u8be5\u547d\u4ee4\u4f1a\u663e\u793a\u6240\u6709\u7684 TCP \u548c UDP \u8fde\u63a5\u4ee5\u53ca\u5bf9\u5e94\u7684\u8fdb\u7a0b\u4fe1\u606f&#xff0c;\u5305\u62ec\u76d1\u542c\u7684\u7aef\u53e3\u548c\u8fdb\u7a0bPID\u3002<\/p>\n<\/p>\n<p>lsof -i :&lt;port_number&gt;<\/p>\n<p>\u4f8b\u5982&#xff0c;lsof -i :80\u00a0\u4f1a\u663e\u793a\u4f7f\u7528 80 \u7aef\u53e3\u7684\u8fdb\u7a0b\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p>\u67e5\u770b\u5f53\u524d\u6240\u6709python\u7a0b\u5e8f\u5efa\u7acb\u7684\u8fde\u63a5\u4fe1\u606f<\/p>\n<p>ss -tunap | grep -E &#034;$(ps -aux | grep python | grep -v &#039;grep&#039; | awk &#039;{print $2}&#039; | paste -sd &#039;|&#039; -)&#034; <\/p>\n<p>\u67e5\u770b\u5f53\u524d\u6240\u6709python\u7a0b\u5e8f\u5efa\u7acb\u670d\u52a1\u5668\u4fe1\u606f<\/p>\n<p>ss -tunlp | grep -E &#034;$(ps -aux | grep python | grep -v &#039;grep&#039; | awk &#039;{print $2}&#039; | paste -sd &#039;|&#039; -)&#034; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb5.8k\u6b21\uff0c\u70b9\u8d5e41\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u8be5\u547d\u4ee4\u4f1a\u663e\u793a\u6240\u6709\u7684 TCP \u548c UDP \u8fde\u63a5\u4ee5\u53ca\u5bf9\u5e94\u7684\u8fdb\u7a0b\u4fe1\u606f\uff0c\u5305\u62ec\u76d1\u542c\u7684\u7aef\u53e3\u548c\u8fdb\u7a0bPID\u3002\u5c06\u5217\u51fa\u5c5e\u4e8e root \u7528\u6237\u4e14\u4f7f\u7528 TCP \u534f\u8bae\u7684\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\u7528\u4e8e\u67e5\u770b\u7cfb\u7edf\u4e2d\u6253\u5f00\u7684\u6587\u4ef6\u548c\u76f8\u5173\u8fdb\u7a0b\u4fe1\u606f\u3002\uff1a\u5217\u51fa\u5360\u7528\u8be5\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684\u8fdb\u7a0b\u3002\u8868\u793a\u5217\u51fa\u4f7f\u7528 TCP \u534f\u8bae\u4e14\u7aef\u53e3\u4e3a 80 \u7684\u8fdb\u7a0b\uff0c\uff1a\u9012\u5f52\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6\uff0c\u4f46\u641c\u7d22\u65f6\u95f4\u76f8\u5bf9\u8f83\u957f\u3002\uff1a\u5217\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u8fdb\u7a0b\u3002\uff1a\u5217\u51fa\u8be5\u7528\u6237\u76f8\u5173\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa GID \u53f7\u8fdb\u7a0b\u7684\u8be6\u60c5\u3002\uff1a\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u53f7\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6\u3002_linux\u67e5\u770b\u8fdb\u7a0b\u7aef\u53e3\u53f7<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,43,44],"topic":[],"class_list":["post-28642","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/28642.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb5.8k\u6b21\uff0c\u70b9\u8d5e41\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u8be5\u547d\u4ee4\u4f1a\u663e\u793a\u6240\u6709\u7684 TCP \u548c UDP \u8fde\u63a5\u4ee5\u53ca\u5bf9\u5e94\u7684\u8fdb\u7a0b\u4fe1\u606f\uff0c\u5305\u62ec\u76d1\u542c\u7684\u7aef\u53e3\u548c\u8fdb\u7a0bPID\u3002\u5c06\u5217\u51fa\u5c5e\u4e8e root \u7528\u6237\u4e14\u4f7f\u7528 TCP \u534f\u8bae\u7684\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\u7528\u4e8e\u67e5\u770b\u7cfb\u7edf\u4e2d\u6253\u5f00\u7684\u6587\u4ef6\u548c\u76f8\u5173\u8fdb\u7a0b\u4fe1\u606f\u3002\uff1a\u5217\u51fa\u5360\u7528\u8be5\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684\u8fdb\u7a0b\u3002\u8868\u793a\u5217\u51fa\u4f7f\u7528 TCP \u534f\u8bae\u4e14\u7aef\u53e3\u4e3a 80 \u7684\u8fdb\u7a0b\uff0c\uff1a\u9012\u5f52\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6\uff0c\u4f46\u641c\u7d22\u65f6\u95f4\u76f8\u5bf9\u8f83\u957f\u3002\uff1a\u5217\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u8fdb\u7a0b\u3002\uff1a\u5217\u51fa\u8be5\u7528\u6237\u76f8\u5173\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa GID \u53f7\u8fdb\u7a0b\u7684\u8be6\u60c5\u3002\uff1a\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u53f7\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6\u3002_linux\u67e5\u770b\u8fdb\u7a0b\u7aef\u53e3\u53f7\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/28642.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T18:05:57+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28642.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/28642.html\",\"name\":\"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T18:05:57+00:00\",\"dateModified\":\"2025-04-19T18:05:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/28642.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/28642.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28642.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/28642.html","og_locale":"zh_CN","og_type":"article","og_title":"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb5.8k\u6b21\uff0c\u70b9\u8d5e41\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u8be5\u547d\u4ee4\u4f1a\u663e\u793a\u6240\u6709\u7684 TCP \u548c UDP \u8fde\u63a5\u4ee5\u53ca\u5bf9\u5e94\u7684\u8fdb\u7a0b\u4fe1\u606f\uff0c\u5305\u62ec\u76d1\u542c\u7684\u7aef\u53e3\u548c\u8fdb\u7a0bPID\u3002\u5c06\u5217\u51fa\u5c5e\u4e8e root \u7528\u6237\u4e14\u4f7f\u7528 TCP \u534f\u8bae\u7684\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\u7528\u4e8e\u67e5\u770b\u7cfb\u7edf\u4e2d\u6253\u5f00\u7684\u6587\u4ef6\u548c\u76f8\u5173\u8fdb\u7a0b\u4fe1\u606f\u3002\uff1a\u5217\u51fa\u5360\u7528\u8be5\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684\u8fdb\u7a0b\u3002\u8868\u793a\u5217\u51fa\u4f7f\u7528 TCP \u534f\u8bae\u4e14\u7aef\u53e3\u4e3a 80 \u7684\u8fdb\u7a0b\uff0c\uff1a\u9012\u5f52\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6\uff0c\u4f46\u641c\u7d22\u65f6\u95f4\u76f8\u5bf9\u8f83\u957f\u3002\uff1a\u5217\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u8fdb\u7a0b\u3002\uff1a\u5217\u51fa\u8be5\u7528\u6237\u76f8\u5173\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa GID \u53f7\u8fdb\u7a0b\u7684\u8be6\u60c5\u3002\uff1a\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u53f7\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa\u6307\u5b9a\u8fdb\u7a0b\u6240\u6253\u5f00\u7684\u6587\u4ef6\u3002\uff1a\u5217\u51fa\u76ee\u5f55\u4e0b\u88ab\u6253\u5f00\u7684\u6587\u4ef6\u3002_linux\u67e5\u770b\u8fdb\u7a0b\u7aef\u53e3\u53f7","og_url":"https:\/\/www.wsisp.com\/helps\/28642.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T18:05:57+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/28642.html","url":"https:\/\/www.wsisp.com\/helps\/28642.html","name":"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T18:05:57+00:00","dateModified":"2025-04-19T18:05:57+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/28642.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/28642.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/28642.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"linux\u67e5\u770b\u8fdb\u7a0b\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u4fe1\u606f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/28642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=28642"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/28642\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=28642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=28642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=28642"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=28642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}