{"id":37015,"date":"2026-11-05T16:31:19","date_gmt":"2026-11-05T08:31:19","guid":{"rendered":"https:\/\/www.varidata.com\/uncategorized-zh-tw\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/"},"modified":"2026-11-05T16:34:23","modified_gmt":"2026-11-05T08:34:23","slug":"how-to-use-fuser-to-identify-the-process-occupying-a-port","status":"publish","type":"post","link":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b"},"content":{"rendered":"\n<p>\u7576\u4f60<a href=\"https:\/\/www.varidata.com\/zh-tw\/server\/los-angeles\/\" target=\"_blank\">\u555f\u52d5\u670d\u52d9<\/a>\u6642\uff0c\u7d42\u7aef\u6a5f\u537b\u7acb\u523b\u56de\u50b3\uff1aaddress already in use\u3002\u9019\u8868\u793a\u8a72\u9023\u63a5\u57e0\u5df2\u88ab\u5176\u4ed6\u7a0b\u5f0f\u6436\u5148\u5360\u7528\uff0c\u5728\u627e\u5230\u5b83\u4e4b\u524d\uff0c\u4f60\u7684\u61c9\u7528\u7a0b\u5f0f\u7121\u6cd5\u7d81\u5b9a\u9019\u500b\u9023\u63a5\u57e0\u3002<\/p>\n<p>\u5728 <a href=\"https:\/\/www.varidata.com\/zh-tw\/blog-tc\/windows-vs-linux-server-concurrency-differences\/\" target=\"_blank\">Linux<\/a> \u4e0a\uff0cfuser \u662f\u627e\u51fa\u7e41\u5fd9\u9023\u63a5\u57e0\u80cc\u5f8c PID \u7684\u6700\u5feb\u65b9\u6cd5\u3002\u53ea\u9700\u4e00\u884c\u547d\u4ee4\u5c31\u80fd\u5f97\u5230\u7b54\u6848\uff1a\u57f7\u884c <code>fuser -v -n tcp [port]<\/code>\uff0c\u5373\u53ef\u67e5\u770b\u5360\u7528\u8a72\u9023\u63a5\u57e0\u7684\u4f7f\u7528\u8005\u548c\u884c\u7a0b ID\u3002<\/p>\n<p>\u5047\u8a2d\u9023\u63a5\u57e0 3000 \u5df2\u7d93\u88ab\u5360\u7528\u3002\u4f60\u53ef\u4ee5\u7528 fuser \u5728\u5e7e\u79d2\u9418\u5167\u67e5\u6e05\u695a\u3002\u672c\u6587\u5c07\u5411\u4f60\u5c55\u793a\u5982\u4f55\u627e\u51fa\u662f\u8ab0\u5728\u4f7f\u7528\u8a72\u9023\u63a5\u57e0\u3001\u5982\u4f55\u6aa2\u67e5 UDP \u9023\u63a5\u57e0\u662f\u5426\u5df2\u88ab\u5360\u7528\uff0c\u4ee5\u53ca\u5728\u63a1\u53d6\u4e0b\u4e00\u6b65\u64cd\u4f5c\u4e4b\u524d\u5982\u4f55\u6b63\u78ba\u89e3\u8b80\u8f38\u51fa\u7d50\u679c\u3002<\/p>\n<h2>\u7406\u89e3 fuser \u547d\u4ee4<\/h2>\n<h3>fuser \u7684\u4f5c\u7528\u53ca\u5176\u4f86\u6e90<\/h3>\n<p>fuser \u662f Linux \u4e0a\u7684\u4e00\u500b\u547d\u4ee4\u5217\u5de5\u5177\uff0c\u7528\u65bc\u8b58\u5225\u76ee\u524d\u6b63\u5728\u4f7f\u7528\u67d0\u500b\u6a94\u6848\u3001\u76ee\u9304\u3001socket \u6216\u6a94\u6848\u7cfb\u7d71\u7684\u884c\u7a0b\u3002\u5b83\u7684\u540d\u5b57\u662f \u300cfile user\u300d \u7684\u7e2e\u5beb\uff0c\u9019\u4e5f\u89e3\u91cb\u4e86\u5b83\u7528\u9014\u5ee3\u6cdb\u7684\u539f\u56e0\u3002\u4f60\u53ef\u4ee5\u5c07\u5b83\u6307\u5411\u4e00\u500b\u88ab\u9396\u5b9a\u7684\u6a94\u6848\u3001\u4e00\u500b\u5df2\u639b\u8f09\u7684\u76ee\u9304\uff0c\u6216\u8005\u4e00\u500b\u7db2\u8def socket\uff0c\u5b83\u90fd\u6703\u544a\u8a34\u4f60\u662f\u8ab0\u5728\u5360\u7528\u5b83\u3002\u6839\u64da Ostechnix \u7684\u8aaa\u6cd5\uff0c\u8a72\u5de5\u5177\u6703\u63d0\u4f9b\u6bcf\u500b\u884c\u7a0b\u7684\u8a73\u7d30\u8cc7\u8a0a\uff0c\u5305\u62ec\u6240\u5c6c\u4f7f\u7528\u8005\u3001\u884c\u7a0b ID\u3001\u5b58\u53d6\u985e\u578b\u4ee5\u53ca\u6240\u4f7f\u7528\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u4f60\u901a\u5e38\u53ef\u4ee5\u5728 psmisc \u5957\u4ef6\u4e2d\u627e\u5230 fuser\uff0c\u800c\u5927\u591a\u6578 Linux \u767c\u884c\u7248\u90fd\u6703\u5167\u5efa\u8a72\u5957\u4ef6\u3002\u9019\u4e00\u9ede\u5c0d\u6545\u969c\u6392\u9664\u975e\u5e38\u91cd\u8981\u3002\u56e0\u70ba\u8a72\u5de5\u5177\u901a\u5e38\u5df2\u7d93\u5b58\u5728\u65bc\u7cfb\u7d71\u4e2d\uff0c\u6240\u4ee5\u4f60\u7121\u9700\u984d\u5916\u5b89\u88dd\u4efb\u4f55\u65b0\u8edf\u9ad4\uff0c\u5c31\u80fd\u8a3a\u65b7\u9023\u63a5\u57e0\u88ab\u5360\u7528\u7684\u554f\u984c\u3002Ostechnix \u6307\u51fa\uff0cfuser \u5728\u6a94\u6848\u9396\u5b9a\u3001\u884c\u7a0b\u7ba1\u7406\u548c\u7cfb\u7d71\u8cc7\u6e90\u554f\u984c\u6392\u67e5\u65b9\u9762\u5c24\u5176\u6709\u7528\u3002<\/p>\n<h3>\u7528\u65bc\u9023\u63a5\u57e0\u6aa2\u67e5\u7684\u57fa\u672c\u8a9e\u6cd5<\/h3>\n<p>-n \u53c3\u6578\u7528\u65bc\u544a\u8a34 fuser \u8981\u641c\u5c0b\u54ea\u500b\u547d\u540d\u7a7a\u9593\uff0c\u4f60\u53ef\u4ee5\u50b3\u5165 tcp \u6216 udp \u4f5c\u70ba\u5354\u5b9a\u3002\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528 port\/protocol \u9019\u7a2e\u7c21\u5beb\u5f62\u5f0f\uff0c\u4f8b\u5982 22\/tcp\uff0c\u628a\u9023\u63a5\u57e0\u865f\u8207\u5354\u5b9a\u5408\u4f75\u70ba\u4e00\u500b\u53c3\u6578\u3002\u9019\u5169\u7a2e\u5beb\u6cd5\u90fd\u53ef\u4ee5\uff0c\u9078\u64c7\u4f60\u89ba\u5f97\u5728\u8a18\u9304\u4e2d\u66f4\u6e05\u695a\u7684\u65b9\u5f0f\u5373\u53ef\u3002<\/p>\n<p>\u9810\u8a2d\u8f38\u51fa\u975e\u5e38\u7cbe\u7c21\u3002fuser \u53ea\u6703\u56de\u50b3 PID\uff0c\u4e26\u4ee5\u7a7a\u683c\u5206\u9694\uff0c\u4e0d\u5e36\u4efb\u4f55\u6a19\u7c64\u3002\u9019\u5c0d\u8173\u672c\u5f88\u65b9\u4fbf\uff0c\u4f46\u4eba\u773c\u95b1\u8b80\u4e26\u4e0d\u53cb\u5584\u3002\u52a0\u4e0a -v \u53c3\u6578\u5f8c\uff0c\u4f60\u6703\u5f97\u5230\u4e00\u500b\u66f4\u8a73\u7d30\u7684\u8f38\u51fa\u8868\uff0c\u5176\u4e2d\u5305\u542b\u56db\u6b04\uff1a<\/p>\n<div class=\"qc-default-table-wrapper \">\n<table style=\"min-width: 50px\">\n<colgroup>\n<col style=\"min-width: 25px\">\n<col style=\"min-width: 25px\"><\/colgroup>\n<tbody>\n<tr>\n<th colspan=\"1\" rowspan=\"1\">\n<p>\u6b04\u4f4d<\/p>\n<\/th>\n<th colspan=\"1\" rowspan=\"1\">\n<p>\u542b\u7fa9<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>USER<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u884c\u7a0b\u7684\u6240\u5c6c\u4f7f\u7528\u8005<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>PID<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u884c\u7a0b ID<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>ACCESS<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b58\u53d6\u985e\u578b\uff0c\u4f8b\u5982 f \u8868\u793a\u958b\u555f\u7684\u6a94\u6848\uff0cc \u8868\u793a\u76ee\u524d\u76ee\u9304<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>COMMAND<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u547d\u4ee4\u540d\u7a31<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u8a73\u7d30\u8f38\u51fa\u771f\u6b63\u56de\u7b54\u4e86\u6838\u5fc3\u554f\u984c\uff1a\u4e0d\u50c5\u662f\u54ea\u500b PID \u5360\u7528\u4e86\u9023\u63a5\u57e0\uff0c\u9084\u5305\u62ec\u662f\u54ea\u500b\u4f7f\u7528\u8005\u3001\u54ea\u500b\u7a0b\u5f0f\u3002\u63a1\u53d6\u64cd\u4f5c\u524d\uff0c\u8acb\u5148\u8b80\u6e05\u695a\u9019\u4e00\u5217\u3002<\/p>\n<h2>\u5982\u4f55\u4f7f\u7528 fuser \u6aa2\u67e5\u9023\u63a5\u57e0<\/h2>\n<h3>\u8b58\u5225\u54ea\u500b\u884c\u7a0b\u6b63\u5728\u76e3\u807d\u67d0\u500b\u7279\u5b9a\u9023\u63a5\u57e0<\/h3>\n<p>\u5148\u4f86\u770b\u4e00\u500b\u5177\u9ad4\u5834\u666f\u3002\u5047\u8a2d\u67d0\u500b\u670d\u52d9\u555f\u52d5\u5931\u6557\uff0c\u56e0\u70ba\u9023\u63a5\u57e0 8002 \u5df2\u88ab\u5176\u4ed6\u7a0b\u5f0f\u5360\u7528\u3002\u57f7\u884c <code>fuser -v -n tcp 8002<\/code>\uff0c\u7136\u5f8c\u95b1\u8b80\u5b83\u5217\u5370\u51fa\u7684\u8868\u683c\u3002USER \u6b04\u986f\u793a\u64c1\u6709\u8a72\u884c\u7a0b\u7684\u5e33\u865f\u3002PID \u6b04\u7d66\u51fa\u4f60\u9700\u8981\u7684\u884c\u7a0b ID\u3002ACCESS \u6b04\u8aaa\u660e\u8a72\u884c\u7a0b\u5982\u4f55\u5b58\u53d6\u9019\u500b socket\uff0c\u5176\u4e2d\u53ef\u80fd\u6703\u51fa\u73fe f \u4e4b\u985e\u7684\u6a19\u8a18\uff0c\u8868\u793a\u5b83\u4ee5\u6a94\u6848\u65b9\u5f0f\u958b\u555f\u8a72 socket\u3002COMMAND \u6b04\u5247\u986f\u793a\u7a0b\u5f0f\u672c\u8eab\u7684\u540d\u7a31\u3002<\/p>\n<p>\u9019\u4e00\u5217\u8cc7\u8a0a\u5c31\u8db3\u5920\u8aaa\u660e\u4e00\u5207\uff1a\u662f\u8ab0\u555f\u52d5\u4e86\u5b83\u3001\u5b83\u662f\u4ec0\u9ebc\u7a0b\u5f0f\uff0c\u4ee5\u53ca\u4f60\u63a5\u4e0b\u4f86\u8a72\u5982\u4f55\u8655\u7406\u3002\u4f60\u53ef\u4ee5\u7528\u9019\u7a2e\u65b9\u5f0f\u6aa2\u67e5\u4efb\u610f\u9023\u63a5\u57e0\uff0c\u901a\u5e38\u4e0d\u5230\u4e00\u79d2\u5c31\u80fd\u5f97\u5230\u7d50\u679c\u3002<\/p>\n<p>\u7c21\u5beb\u5f62\u5f0f\u7684\u6548\u679c\u5b8c\u5168\u4e00\u6a23\u3002\u4f60\u4e0d\u5fc5\u5206\u958b\u5beb\u53c3\u6578\uff0c\u800c\u662f\u53ef\u4ee5\u628a\u9023\u63a5\u57e0\u548c\u5354\u5b9a\u76f4\u63a5\u5beb\u5728\u4e00\u8d77\u3002VMware Photon \u7684\u6587\u4ef6\u6e05\u695a\u5c55\u793a\u4e86\u9019\u7a2e\u5beb\u6cd5\uff1a<\/p>\n<p>\u8acb\u628a\u8a72\u8f38\u51fa\u7406\u89e3\u70ba\u4e00\u4efd\u7d14 PID \u6e05\u55ae\u3002\u5de6\u5074\u6a19\u7c64\u8868\u793a socket\uff0c\u53f3\u5074\u6578\u5b57\u5247\u662f\u9644\u8457\u5728\u5176\u4e0a\u7684\u884c\u7a0b\u3002\u591a\u500b\u6578\u5b57\u8aaa\u660e\u6709\u591a\u500b\u884c\u7a0b\u5171\u7528\u540c\u4e00\u500b socket\uff0c\u9019\u5728\u6703\u6d3e\u751f\u591a\u500b\u5de5\u4f5c\u884c\u7a0b\u7684 Web \u4f3a\u670d\u5668\u4e2d\u5f88\u5e38\u898b\u3002\u8981\u627e\u51fa\u67d0\u500b\u7279\u5b9a\u9023\u63a5\u57e0\u4e0a\u6b63\u5728\u76e3\u807d\u7684\u884c\u7a0b\uff0f\u670d\u52d9\uff0c\u5728\u5927\u591a\u6578\u60c5\u6cc1\u4e0b\u4f60\u901a\u5e38\u53ea\u9700\u8981\u7b2c\u4e00\u500b\u6578\u5b57\u3002<\/p>\n<p>\u5354\u5b9a\u975e\u5e38\u91cd\u8981\u3002TCP \u6aa2\u67e5\u4e0d\u6703\u986f\u793a UDP \u76e3\u807d\u5668\uff0c\u53cd\u904e\u4f86\u4e5f\u4e00\u6a23\u3002\u56e0\u6b64\u52d9\u5fc5\u8b93\u53c3\u6578\u8207\u5be6\u969b\u6d41\u91cf\u985e\u578b\u5339\u914d\u3002\u5982\u679c\u4f60\u4e0d\u78ba\u5b9a\uff0c\u5c31\u628a\u5169\u7a2e\u90fd\u67e5\u4e00\u904d\u3002\u9019\u6b63\u662f\u5728 Linux \u4e2d\u67e5\u627e\u54ea\u500b\u884c\u7a0b\u6216\u670d\u52d9\u6b63\u5728\u76e3\u807d\u67d0\u500b\u7279\u5b9a\u9023\u63a5\u57e0\u7684\u6838\u5fc3\u7fd2\u6163\uff1a\u5148\u78ba\u8a8d\u5354\u5b9a\uff0c\u518d\u78ba\u8a8d\u9023\u63a5\u57e0\u3002<\/p>\n<h3>\u6b63\u78ba\u89e3\u8b80\u8f38\u51fa\u7d50\u679c<\/h3>\n<p>\u8a73\u7d30\u8f38\u51fa\u8868\u503c\u5f97\u4f60\u4ed4\u7d30\u95b1\u8b80\u3002\u6a19\u8a18\u70ba f \u7684\u884c\u7a0b\u8868\u793a\u5b83\u5c07\u8a72 socket \u4f5c\u70ba\u6a94\u6848\u4fdd\u6301\u958b\u555f\u72c0\u614b\u3002\u6a19\u8a18\u70ba c \u7684\u884c\u7a0b\u5247\u8868\u793a\u5b83\u4f4d\u65bc\u90a3\u500b\u76ee\u9304\u4e2d\u3002\u5c0d\u65bc\u7db2\u8def\u6aa2\u67e5\u4f86\u8aaa\uff0c\u4f60\u901a\u5e38\u6700\u95dc\u6ce8\u7684\u662f PID \u548c COMMAND \u9019\u5169\u500b\u6b04\u4f4d\u7684\u7d44\u5408\u3002<\/p>\n<p>\u7c21\u5beb\u5f62\u5f0f\u80fd\u6e1b\u5c11\u8f38\u5165\u91cf\u3002\u57f7\u884c sudo fuser 80\/tcp \u6703\u56de\u50b3\u4e00\u500b\u7d14 PID \u6e05\u55ae\uff0c\u9069\u5408\u8173\u672c\u6216\u5feb\u901f\u67e5\u770b\u3002-v \u53c3\u6578\u5247\u66f4\u9069\u5408\u4eba\u4f86\u95b1\u8b80\u3002\u6839\u64da\u4f60\u662f\u8981\u7acb\u5373\u8655\u7406\uff0c\u9084\u662f\u50c5\u8a18\u9304\u7d50\u679c\uff0c\u4f86\u9078\u64c7\u5c0d\u61c9\u65b9\u5f0f\u3002<\/p>\n<p>\u9084\u6709\u4e00\u500b\u5340\u5225\u4e5f\u5f88\u6709\u5e6b\u52a9\u3002\u67d0\u500b\u904b\u884c\u5728\u8a72\u9023\u63a5\u57e0\u4e0a\u7684\u884c\u7a0b\uff0c\u53ef\u80fd\u53ea\u662f\u4e00\u500b\u7528\u6236\u7aef\u9023\u7dda\uff0c\u800c\u4e0d\u4e00\u5b9a\u662f\u670d\u52d9\u7aef\u76e3\u807d\u7a0b\u5f0f\u3002\u8a73\u7d30\u8f38\u51fa\u6703\u986f\u793a\u547d\u4ee4\u540d\u7a31\uff0c\u56e0\u6b64\u4f60\u53ef\u4ee5\u5206\u8fa8\u5b83\u662f\u700f\u89bd\u5668\u9084\u662f\u5e38\u99d0\u7a0b\u5f0f\u3002\u9019\u7a2e\u4e0a\u4e0b\u6587\u8cc7\u8a0a\u80fd\u5e6b\u52a9\u4f60\u907f\u514d\u5f8c\u7e8c\u505a\u51fa\u4ee3\u50f9\u9ad8\u6602\u7684\u8aa4\u5224\u3002<\/p>\n<h2>\u7d42\u6b62\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b<\/h2>\n<h3>\u4f7f\u7528 fuser \u50b3\u9001\u8a0a\u865f<\/h3>\n<p>\u6709\u6642\u4f60\u8b58\u5225\u51fa\u67d0\u500b\u884c\u7a0b\u5f8c\uff0c\u6703\u6c7a\u5b9a\u5fc5\u9808\u628a\u5b83\u7d50\u675f\u6389\u3002fuser \u547d\u4ee4\u53ef\u4ee5\u76f4\u63a5\u66ff\u4f60\u50b3\u9001\u8a0a\u865f\u3002\u52a0\u4e0a -k \u53c3\u6578\u5f8c\uff0c\u5de5\u5177\u6703\u7d42\u6b62\u6240\u6709\u9644\u8457\u5728\u8a72 socket \u4e0a\u7684\u884c\u7a0b\u3002\u5178\u578b\u547d\u4ee4\u5f62\u5982 fuser -k port\/tcp\uff0c\u5176\u4e2d\u4f60\u9700\u8981\u628a\u5360\u4f4d\u7b26\u66ff\u63db\u6210\u5be6\u969b\u9023\u63a5\u57e0\u865f\u3002\u6bd4\u5982\u67d0\u500b\u670d\u52d9\u5361\u5728\u9023\u63a5\u57e0 3000 \u4e0a\uff0c\u4f60\u53ef\u4ee5\u57f7\u884c fuser -k 3000\/tcp\u3002\u8a72\u5de5\u5177\u9810\u8a2d\u50b3\u9001 SIGKILL\uff0c\u4e5f\u5c31\u662f\u7acb\u5373\u5f37\u5236\u7d50\u675f\u884c\u7a0b\uff0c\u4e0d\u7d66\u4efb\u4f55\u6e05\u7406\u6a5f\u6703\u3002\u5c0d\u65bc\u751f\u7522\u74b0\u5883\u4e2d\u7684\u670d\u52d9\u4f86\u8aaa\uff0c\u9019\u7a2e\u9810\u8a2d\u884c\u70ba\u76f8\u7576\u6fc0\u70c8\u3002\u7a0b\u5f0f\u6c92\u6709\u6a5f\u6703\u5237\u65b0\u7de9\u885d\u5340\uff0c\u4e5f\u7121\u6cd5\u6b63\u5e38\u95dc\u9589\u6a94\u6848\u3002<\/p>\n<p>\u4f60\u4e5f\u53ef\u4ee5\u9078\u64c7\u66f4\u6eab\u548c\u7684\u8a0a\u865f\u3002-SIGNAL \u9078\u9805\u5141\u8a31\u4f60\u6307\u5b9a\u8981\u50b3\u9001\u7684\u8a0a\u865f\u3002\u4f8b\u5982\uff0c\u52a0\u4e0a -TERM \u8868\u793a\u8acb\u6c42\u884c\u7a0b\u512a\u96c5\u9000\u51fa\u3002\u9019\u6a23\u7a0b\u5f0f\u5c31\u6709\u6a5f\u6703\u95dc\u9589\u6a94\u6848\u4e26\u91cb\u653e\u8cc7\u6e90\u3002\u53ea\u6709\u7576\u512a\u96c5\u505c\u6b62\u5931\u6557\u6642\uff0c\u518d\u4f7f\u7528 SIGKILL\u3002\u4e00\u500b\u8f03\u597d\u7684\u9806\u5e8f\u662f\u5148\u767c TERM\uff0c\u7a0d\u7b49\u7247\u523b\uff0c\u5982\u679c\u884c\u7a0b\u4ecd\u7136\u5b58\u5728\uff0c\u518d\u767c KILL\u3002\u628a -k \u548c -v \u7d50\u5408\u8d77\u4f86\u9084\u80fd\u8b93\u4f60\u770b\u5230\u5de5\u5177\u7684\u57f7\u884c\u904e\u7a0b\u3002\u8a73\u7d30\u6a21\u5f0f\u6703\u5217\u5370\u51fa\u6bcf\u500b\u6536\u5230\u8a0a\u865f\u7684 PID\u3002\u64cd\u4f5c\u4e4b\u5f8c\u8acb\u6aa2\u67e5\u9000\u51fa\u72c0\u614b\u3002\u56de\u50b3\u503c\u70ba 0 \u8868\u793a\u8a0a\u865f\u5df2\u6210\u529f\u9001\u9054\u76ee\u6a19\u3002<\/p>\n<p>-k \u53c3\u6578\u65e2\u53ef\u4ee5\u8207\u547d\u540d\u7a7a\u9593\u53c3\u6578\u4e00\u8d77\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u548c socket \u53c3\u6578\u4e00\u8d77\u4f7f\u7528\u3002\u4f60\u53ef\u4ee5\u5beb\u6210 fuser -k -n tcp 8080\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7c21\u5beb fuser -k port\/tcp\u3002\u9019\u5169\u7a2e\u65b9\u5f0f\u91dd\u5c0d\u7684\u662f\u540c\u4e00\u500b\u884c\u7a0b\u3002\u7c21\u5beb\u5728\u7d42\u7aef\u6a5f\u4e2d\u8655\u7406\u7e41\u5fd9\u9023\u63a5\u57e0\u6642\u8b80\u8d77\u4f86\u66f4\u5feb\uff1b\u9577\u5beb\u6cd5\u5247\u5728\u8173\u672c\u4e2d\u66f4\u6613\u65bc\u81ea\u6211\u8aaa\u660e\u3002\u9078\u64c7\u9069\u5408\u4f60\u5de5\u4f5c\u6d41\u7a0b\u7684\u98a8\u683c\u5373\u53ef\u3002<\/p>\n<h3>\u57f7\u884c kill \u524d\u7684\u5b89\u5168\u6aa2\u67e5<\/h3>\n<p>\u8aa4\u6bba\u932f\u8aa4\u7684\u884c\u7a0b\u53ef\u80fd\u6703\u5c0e\u81f4\u670d\u52d9\u4e2d\u65b7\u3001\u6d3b\u52d5\u9023\u7dda\u6389\u7dda\uff0c\u751a\u81f3\u6253\u65b7\u8cc7\u6599\u5eab\u5beb\u5165\u3002\u57f7\u884c\u64cd\u4f5c\u524d\uff0c\u5148\u78ba\u8a8d\u5169\u4ef6\u4e8b\uff1aPID \u548c\u547d\u4ee4\u540d\u7a31\u3002\u50b3\u9001\u8a0a\u865f\u524d\u8acb\u5148\u57f7\u884c\u8a73\u7d30\u6aa2\u67e5\u3002\u4ed4\u7d30\u67e5\u770b USER\u3001PID \u548c COMMAND \u6b04\u3002\u554f\u554f\u81ea\u5df1\uff1a\u9019\u500b\u7a0b\u5f0f\u662f\u5426\u672c\u4f86\u5c31\u61c9\u8a72\u5728\u904b\u884c\uff1f\u4e00\u500b Web \u4f3a\u670d\u5668\u5360\u7528\u67d0\u500b\u7e41\u5fd9 socket \u662f\u6b63\u5e38\u73fe\u8c61\uff1b\u800c\u4e00\u500b\u964c\u751f\u4e8c\u9032\u4f4d\u6a94\u5360\u8457\u9023\u63a5\u57e0\uff0c\u5247\u66f4\u503c\u5f97\u8abf\u67e5\uff0c\u800c\u4e0d\u662f\u7acb\u523b\u50b3\u9001 kill \u8a0a\u865f\u3002\u5982\u679c\u547d\u4ee4\u540d\u7a31\u770b\u8d77\u4f86\u4e0d\u719f\u6089\uff0c\u8acb\u7528 ps -p PID -o comm= \u9032\u884c\u4ea4\u53c9\u9a57\u8b49\u3002\u64cd\u4f5c\u524d\u628a PID \u8a18\u9304\u4e0b\u4f86\u3002\u5982\u679c\u5f8c\u7e8c\u670d\u52d9\u51fa\u73fe\u6545\u969c\uff0c\u9019\u4efd\u8a18\u9304\u6703\u5f88\u6709\u5e6b\u52a9\u3002<\/p>\n<blockquote>\n<p>\u6c38\u9060\u4e0d\u8981\u5c0d\u4e00\u500b\u5c1a\u672a\u6838\u5be6\u7684 PID \u57f7\u884c kill \u547d\u4ee4\u3002\u8a73\u7d30\u8f38\u51fa\u5b58\u5728\u7684\u610f\u7fa9\uff0c\u6b63\u662f\u70ba\u4e86\u907f\u514d\u9019\u7a2e\u932f\u8aa4\u3002<\/p>\n<\/blockquote>\n<p>\u6b0a\u9650\u540c\u6a23\u5f88\u91cd\u8981\u3002\u4f60\u53ea\u80fd\u5411\u81ea\u5df1\u64c1\u6709\u7684\u884c\u7a0b\u50b3\u9001\u8a0a\u865f\u3002\u5728\u5171\u4eab Linux \u4f3a\u670d\u5668\u4e0a\uff0c\u5176\u4ed6\u4f7f\u7528\u8005\u7684\u5e38\u99d0\u7a0b\u5f0f\u6703\u62d2\u7d55\u4f60\u7684\u8a0a\u865f\u3002\u7d66\u547d\u4ee4\u52a0\u4e0a sudo \u524d\u7db4\uff0c\u5c31\u80fd\u7372\u5f97\u6240\u9700\u6b0a\u9650\u3002\u7cfb\u7d71\u6703\u63d0\u793a\u4f60\u8f38\u5165\u5bc6\u78bc\uff0c\u7136\u5f8c\u518d\u50b3\u9001\u8a72\u8a0a\u865f\u3002\u5982\u679c\u6c92\u6709\u9019\u500b\u524d\u7db4\uff0c\u5de5\u5177\u6703\u5831\u932f\uff0c\u800c\u4e14\u4e0d\u6703\u767c\u751f\u4efb\u4f55\u4e8b\u60c5\u3002<\/p>\n<p>\u9084\u6709\u4e00\u500b\u7fd2\u6163\u4e5f\u5f88\u6709\u5e6b\u52a9\uff1a\u6aa2\u67e5\u8a72\u884c\u7a0b\u662f\u5426\u6703\u81ea\u52d5\u91cd\u555f\u3002\u5f88\u591a\u670d\u52d9\u90fd\u904b\u884c\u5728\u67d0\u500b supervisor \u7684\u7ba1\u7406\u4e4b\u4e0b\uff0c\u5e7e\u79d2\u9418\u5167\u5c31\u6703\u88ab\u91cd\u65b0\u62c9\u8d77\u3002\u6bba\u6389\u9019\u6a23\u7684\u884c\u7a0b\uff0c\u53ea\u6703\u77ed\u66ab\u91cb\u653e\u9023\u63a5\u57e0\uff0c\u96a8\u5f8c\u540c\u4e00\u500b\u7a0b\u5f0f\u53c8\u6703\u518d\u6b21\u5360\u7528\u5b83\u3002\u4f60\u9700\u8981\u5148\u505c\u6b62 supervisor\uff0c\u5426\u5247\u9019\u500b\u5faa\u74b0\u6703\u4e0d\u65b7\u91cd\u8907\u3002\u4e0d\u7136\u4f60\u6703\u4e00\u76f4\u8ffd\u8457\u540c\u4e00\u500b\u554f\u984c\u8dd1\u3002kill \u5b8c\u6210\u5f8c\uff0c\u8acb\u518d\u6b21\u57f7\u884c\u8a73\u7d30\u6aa2\u67e5\uff0c\u4ee5\u78ba\u8a8d\u9023\u63a5\u57e0\u5df2\u7d93\u91cb\u653e\u3002<\/p>\n<h2>\u6545\u969c\u6392\u9664\u8207\u4ea4\u53c9\u9a57\u8b49<\/h2>\n<h3>\u7576 fuser \u6c92\u6709\u56de\u50b3\u4efb\u4f55\u7d50\u679c\u6642<\/h3>\n<p>\u7a7a\u7d50\u679c\u4e26\u4e0d\u7e3d\u662f\u610f\u5473\u8457\u9023\u63a5\u57e0\u662f\u7a7a\u9592\u7684\u3002\u6700\u5e38\u898b\u7684\u539f\u56e0\u662f\u5354\u5b9a\u4e0d\u5339\u914d\u3002\u4f60\u6aa2\u67e5\u7684\u662f TCP\uff0c\u4f46\u5be6\u969b\u5360\u7528\u8a72 socket \u7684\u662f\u4e00\u500b UDP \u670d\u52d9\u3002\u5728\u4e0b\u7d50\u8ad6\u4e4b\u524d\uff0c\u8acb\u4f7f\u7528\u53e6\u4e00\u7a2e\u5354\u5b9a\u518d\u67e5\u4e00\u6b21\u3002<\/p>\n<p>IPv6 \u662f\u4e0b\u4e00\u500b\u5e38\u898b\u300c\u5751\u300d\u3002\u7d81\u5b9a\u5728 IPv6 \u5354\u5b9a\u5806\u758a\u4e0a\u7684\u670d\u52d9\uff0c\u53ef\u80fd\u4e0d\u6703\u51fa\u73fe\u5728 IPv4 \u7684\u67e5\u8a62\u7d50\u679c\u4e2d\uff0c\u53cd\u4e4b\u4ea6\u7136\u3002\u5982\u679c \u300cport already in use\u300d \u932f\u8aa4\u4ecd\u7136\u5b58\u5728\uff0c\u8acb\u6e2c\u8a66\u5169\u7a2e\u4f4d\u5740\u65cf\u3002<\/p>\n<p>\u6b0a\u9650\u554f\u984c\u5247\u662f\u6700\u5f8c\u4e00\u500b\u5e38\u898b\u539f\u56e0\u3002\u5c6c\u65bc\u5176\u4ed6\u4f7f\u7528\u8005\u7684\u884c\u7a0b\uff0c\u5c0d\u4f60\u7684\u5e33\u865f\u4f86\u8aaa\u53ef\u80fd\u662f\u4e0d\u53ef\u898b\u7684\u3002\u7d66\u547d\u4ee4\u52a0\u4e0a sudo\uff0c\u518d\u91cd\u65b0\u67e5\u8a62\u4e00\u904d\u3002\u4f60\u53ef\u4ee5\u7528 fuser \u5feb\u901f\u6aa2\u67e5\uff0c\u4f46\u5982\u679c\u5f97\u5230\u7a7a\u7d50\u679c\uff0c\u503c\u5f97\u518d\u591a\u505a\u4e00\u6b65\u78ba\u8a8d\u3002<\/p>\n<h3>\u4f7f\u7528 lsof \u548c netstat \u9032\u884c\u4ea4\u53c9\u6aa2\u67e5<\/h3>\n<p>\u9a57\u8b49\u80fd\u907f\u514d\u8aa4\u5224\uff0c\u53e6\u5916\u5169\u500b\u5de5\u5177\u53ef\u4ee5\u70ba\u4f60\u63d0\u4f9b\u7b2c\u4e8c\u610f\u898b\u3002OneUptime \u90e8\u843d\u683c\u7528\u4e00\u5f35\u7c21\u6f54\u7684\u53c3\u8003\u8868\u8a18\u9304\u4e86\u9019\u4e9b\u5e38\u7528\u547d\u4ee4\uff1a<\/p>\n<div class=\"qc-default-table-wrapper \">\n<table style=\"min-width: 50px\">\n<colgroup>\n<col style=\"min-width: 25px\">\n<col style=\"min-width: 25px\"><\/colgroup>\n<tbody>\n<tr>\n<th colspan=\"1\" rowspan=\"1\">\n<p>\u5de5\u5177 \/ \u547d\u4ee4<\/p>\n<\/th>\n<th colspan=\"1\" rowspan=\"1\">\n<p>\u7528\u9014<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p><code>sudo netstat -tulnp<\/code><\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5217\u51fa\u6240\u6709\u6b63\u5728\u76e3\u807d\u7684\u9023\u63a5\u57e0\u53ca\u5176\u884c\u7a0b\u8cc7\u8a0a\uff08TCP \u548c UDP\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p><code>sudo netstat -tlnp | grep ':8080 '<\/code><\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u67e5\u627e\u67d0\u500b\u7279\u5b9a\u9023\u63a5\u57e0\u4e0a\u7684\u884c\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p><code>sudo lsof -i :80<\/code><\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u986f\u793a\u6240\u6709\u6b63\u5728\u4f7f\u7528 80 \u9023\u63a5\u57e0\u7684\u884c\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p><code>sudo lsof -i TCP:22<\/code><\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6309\u7279\u5b9a\u5354\u5b9a\u548c\u9023\u63a5\u57e0\u9032\u884c\u67e5\u8a62<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u7576\u4f60\u9700\u8981\u66f4\u6613\u8b80\u7684\u7d50\u679c\u6642\uff0c\u53ef\u4ee5\u5148\u5f9e lsof -i :3000 \u958b\u59cb\u3002\u5b83\u7684\u8f38\u51fa\u6703\u5728\u4e00\u884c\u4e2d\u7d66\u51fa\u547d\u4ee4\u540d\u3001\u4f7f\u7528\u8005\u548c PID\u3002\u52a0\u4e0a -t \u53c3\u6578\u5f8c\uff0c\u5247\u53ea\u56de\u50b3 PID \u6e05\u55ae\uff1alsof -t -i :3000 \u5f88\u9069\u5408\u8173\u672c\u548c kill \u547d\u4ee4\u3002\u7576 netstat \u5728\u975e root \u5e33\u865f\u4e0b\u7121\u6cd5\u986f\u793a\u884c\u7a0b\u8a73\u60c5\u6642\uff0cOneUptime \u5efa\u8b70\u4f7f\u7528 ss -tulpn | grep :3000 \u4f5c\u70ba\u66ff\u4ee3\u65b9\u6848\u3002<\/p>\n<p>\u9019\u4e9b\u7fd2\u6163\u5728\u4efb\u4f55 Linux \u4f3a\u670d\u5668\u4e0a\u90fd\u5f88\u91cd\u8981\u3002\u8981\u627e\u51fa\u67d0\u500b\u7279\u5b9a\u9023\u63a5\u57e0\u4e0a\u6b63\u5728\u76e3\u807d\u7684\u884c\u7a0b\uff0f\u670d\u52d9\uff0c\u8acb\u7528\u7b2c\u4e8c\u500b\u5de5\u5177\u518d\u78ba\u8a8d\u4e00\u6b21\u3002\u76f8\u540c\u7684\u539f\u5247\u4e5f\u9069\u7528\u65bc\u4f60\u5728\u7e41\u5fd9\u4e3b\u6a5f\u4e0a\u8abf\u67e5\u67d0\u500b\u7279\u5b9a\u9023\u63a5\u57e0\u6642\u3002\u5c0d\u67d0\u500b\u9023\u63a5\u57e0\u505a\u4ea4\u53c9\u9a57\u8b49\u53ea\u9700\u8981\u5e7e\u79d2\u9418\uff0c\u537b\u53ef\u4ee5\u5e6b\u52a9\u4f60\u767c\u73fe\u5354\u5b9a\u6216\u6b0a\u9650\u5e36\u4f86\u7684\u76f2\u9ede\u3002\u9019\u624d\u662f\u5728 Linux \u4e2d\u6709\u628a\u63e1\u5730\u78ba\u8a8d\u67d0\u500b\u7279\u5b9a\u9023\u63a5\u57e0\u76e3\u807d\u60c5\u6cc1\u7684\u5be6\u7528\u505a\u6cd5\u3002<\/p>\n<div class=\"qc-divider-wrapper\">\n<div class=\"qc-divider\" style=\"border-top-style: solid;width: 100%\"><\/div>\n<\/div>\n<p>\u73fe\u5728\uff0c\u4f60\u5df2\u7d93\u638c\u63e1\u4e86\u4e00\u5957\u53ef\u91cd\u8907\u4f7f\u7528\u7684\u7e41\u5fd9 socket \u6392\u67e5\u6d41\u7a0b\uff1a<\/p>\n<ol>\n<li>\n<p>\u627e\u51fa\u7d81\u5b9a\u5931\u6557\u7684\u9023\u63a5\u57e0\u3002<\/p>\n<\/li>\n<li>\n<p>\u57f7\u884c <code>fuser -v -n tcp [port]<\/code>\uff0c\u53d6\u5f97 PID\u3001\u4f7f\u7528\u8005\u548c\u547d\u4ee4\u540d\u7a31\u3002<\/p>\n<\/li>\n<li>\n<p>\u6c7a\u5b9a\u662f\u7d42\u6b62\u8a72\u884c\u7a0b\uff0c\u9084\u662f\u8b93\u5b83\u7e7c\u7e8c\u904b\u884c\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u8a72\u5de5\u5177\u5728\u5e7e\u4e4e\u6240\u6709 Linux \u7cfb\u7d71\u4e2d\u90fd\u96a8 psmisc \u5957\u4ef6\u4e00\u8d77\u63d0\u4f9b\uff0c\u56e0\u6b64\u4f60\u53ef\u4ee5\u5728\u7121\u9700\u5b89\u88dd\u984d\u5916\u8edf\u9ad4\u7684\u60c5\u6cc1\u4e0b\uff0c\u4f7f\u7528 fuser \u6aa2\u67e5\u9023\u63a5\u57e0\u3002\u9019\u4f7f\u5b83\u975e\u5e38\u9069\u5408\u7528\u65bc\u5feb\u901f\u7684\u4f3a\u670d\u5668\u6545\u969c\u6392\u9664\u3002<\/p>\n<p>\u5728\u7d42\u6b62\u884c\u7a0b\u4e4b\u524d\u52d9\u5fc5\u5148\u9032\u884c\u6838\u5be6\u3002\u67e5\u770b\u547d\u4ee4\u540d\u7a31\uff0c\u78ba\u8a8d\u6240\u5c6c\u4f7f\u7528\u8005\uff0c\u4e26\u6aa2\u67e5\u662f\u5426\u5b58\u5728\u6703\u81ea\u52d5\u91cd\u555f\u670d\u52d9\u7684 supervisor\u3002\u4e00\u6b21\u8b39\u614e\u7684\u6aa2\u67e5\uff0c\u53ef\u4ee5\u5e6b\u52a9\u4f60\u907f\u514d\u696d\u52d9\u4e2d\u65b7\u3002<\/p>\n<h2>\u5e38\u898b\u554f\u984c<\/h2>\n<h3>fuser \u5728\u6240\u6709 Linux \u767c\u884c\u7248\u4e0a\u90fd\u80fd\u4f7f\u7528\u55ce\uff1f<\/h3>\n<p>\u5927\u591a\u6578\u767c\u884c\u7248\u90fd\u6703\u5c07 fuser \u5305\u542b\u5728 psmisc \u5957\u4ef6\u4e2d\uff0c\u56e0\u6b64\u901a\u5e38\u7cfb\u7d71\u88e1\u5df2\u7d93\u6709\u4e86\u3002\u5982\u679c\u547d\u4ee4\u57f7\u884c\u5931\u6557\uff0c\u53ef\u4ee5\u5148\u7528 <code>which fuser<\/code> \u6aa2\u67e5\u662f\u5426\u5b58\u5728\u3002\u67d0\u4e9b\u6975\u7c21\u5bb9\u5668\u6620\u50cf\u53ef\u80fd\u4e0d\u6703\u5305\u542b psmisc\uff0c\u9019\u6642\u4f60\u53ef\u4ee5\u5b89\u88dd\u5b83\uff0c\u6216\u8005\u6539\u7528 lsof\u3002<\/p>\n<h3>\u70ba\u4ec0\u9ebc fuser \u53ea\u986f\u793a PID\uff0c\u537b\u4e0d\u986f\u793a\u547d\u4ee4\u540d\u7a31\uff1f<\/h3>\n<p>\u56e0\u70ba\u4f60\u6c92\u6709\u52a0\u8a73\u7d30\u6a21\u5f0f\u53c3\u6578\u3002\u9810\u8a2d\u8f38\u51fa\u53ea\u6703\u5217\u51fa PID\u3002\u52a0\u4e0a <code>-v<\/code> \u5f8c\uff0c\u5c31\u80fd\u770b\u5230\u6bcf\u500b\u884c\u7a0b\u7684\u4f7f\u7528\u8005\u3001\u5b58\u53d6\u985e\u578b\u548c\u547d\u4ee4\u540d\u7a31\u3002\u9019\u4e9b\u984d\u5916\u4e0a\u4e0b\u6587\u6709\u52a9\u65bc\u4f60\u5728\u50b3\u9001\u8a0a\u865f\u524d\u78ba\u8a8d\u7a0b\u5f0f\u8eab\u5206\u3002<\/p>\n<h3>\u6211\u53ef\u4ee5\u7528\u540c\u6a23\u7684\u547d\u4ee4\u6aa2\u67e5 UDP \u9023\u63a5\u57e0\u55ce\uff1f<\/h3>\n<p>\u53ef\u4ee5\u3002\u53ea\u9700\u66ff\u63db\u5354\u5b9a\u53c3\u6578\uff1a<code>fuser -v -n udp [port]<\/code>\u3002TCP \u67e5\u8a62\u4e0d\u6703\u986f\u793a UDP \u76e3\u807d\u5668\uff0c\u56e0\u6b64\u53c3\u6578\u5fc5\u9808\u8207\u6d41\u91cf\u985e\u578b\u5339\u914d\u3002\u5982\u679c\u4e0d\u78ba\u5b9a\uff0c\u5c31\u628a\u5169\u7a2e\u90fd\u6aa2\u67e5\u4e00\u904d\u3002<\/p>\n<h3>\u57f7\u884c fuser \u4e00\u5b9a\u9700\u8981 root \u6b0a\u9650\u55ce\uff1f<\/h3>\n<p>\u4e0d\u4e00\u5b9a\uff0c\u4f46\u6b0a\u9650\u6703\u5f71\u97ff\u4f60\u80fd\u770b\u5230\u7684\u5167\u5bb9\u3002\u4f60\u81ea\u5df1\u7684\u884c\u7a0b\u7121\u9700\u63d0\u6b0a\u4e5f\u80fd\u770b\u5230\u3002\u5176\u4ed6\u4f7f\u7528\u8005\u7684\u884c\u7a0b\u5247\u53ea\u6709\u5728\u52a0\u4e0a sudo \u5f8c\u624d\u6703\u986f\u793a\u3002\u5411\u67d0\u500b\u7279\u5b9a\u884c\u7a0b\u6301\u6709\u8005\u50b3\u9001\u8a0a\u865f\u6642\uff0c\u540c\u6a23\u9075\u5faa\u9019\u4e00\u898f\u5247\u3002<\/p>\n<h3>\u5982\u679c fuser \u548c lsof \u7684\u7d50\u679c\u4e0d\u4e00\u81f4\u600e\u9ebc\u8fa6\uff1f<\/h3>\n<p>\u4e0d\u8981\u76f2\u4fe1\u4efb\u4f55\u4e00\u500b\u3002\u5148\u91cd\u65b0\u6aa2\u67e5\u5354\u5b9a\u548c\u4f4d\u5740\u65cf\uff0c\u7136\u5f8c\u518d\u7528 <code>ss -tulpn<\/code> \u505a\u6bd4\u8f03\u3002\u9673\u820a\u689d\u76ee\u6216\u6b0a\u9650\u5dee\u7570\u90fd\u53ef\u80fd\u5c0e\u81f4\u7d50\u679c\u4e0d\u4e00\u81f4\u3002\u5728\u5c0d Linux \u4e0a\u7684\u884c\u7a0b\u63a1\u53d6\u64cd\u4f5c\u4e4b\u524d\uff0c\u8acb\u5148\u4f7f\u7528 <code>ps -p [PID]<\/code> \u518d\u6b21\u78ba\u8a8d PID\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7576\u4f60\u555f\u52d5\u670d\u52d9\u6642\uff0c\u7d42\u7aef\u6a5f\u537b\u7acb\u523b\u56de\u50b3\uff1aaddress already in use\u3002\u9019\u8868\u793a\u8a72\u9023\u63a5\u57e0\u5df2\u88ab\u5176\u4ed6\u7a0b\u5f0f\u6436\u5148 [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":12,"featured_media":37012,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[268],"tags":[],"class_list":["post-37015","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge-tc"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b<\/title>\n<meta name=\"description\" content=\"\u4f7f\u7528 fuser \u6aa2\u67e5\u54ea\u500b\u884c\u7a0b\u5360\u7528\u4e86\u9023\u63a5\u57e0\uff1a\u57f7\u884c fuser -v -n tcp [port] \u53ef\u67e5\u770b PID\u3001\u4f7f\u7528\u8005\u548c\u547d\u4ee4\u3002\u5feb\u901f\u5b9a\u4f4d\u4e26\u89e3\u6c7a\u9023\u63a5\u57e0\u885d\u7a81\u3002\" \/>\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.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/\" \/>\n<meta property=\"og:site_name\" content=\"Varidata Limited\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-05T08:31:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-05T08:34:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.varidata.com\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-05-163039.png\" \/>\n\t<meta property=\"og:image:width\" content=\"765\" \/>\n\t<meta property=\"og:image:height\" content=\"503\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/\"},\"author\":\"Varidata\",\"headline\":\"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b\",\"datePublished\":\"2026-11-05T08:31:19+00:00\",\"dateModified\":\"2026-11-05T08:34:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/\"},\"wordCount\":183,\"publisher\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Screenshot-2026-11-05-163039.png\",\"articleSection\":[\"Varidata \u77e5\u8b58\u6587\u6a94\"],\"inLanguage\":\"zh-TW\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/\",\"name\":\"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Screenshot-2026-11-05-163039.png\",\"datePublished\":\"2026-11-05T08:31:19+00:00\",\"dateModified\":\"2026-11-05T08:34:23+00:00\",\"description\":\"\u4f7f\u7528 fuser \u6aa2\u67e5\u54ea\u500b\u884c\u7a0b\u5360\u7528\u4e86\u9023\u63a5\u57e0\uff1a\u57f7\u884c fuser -v -n tcp [port] \u53ef\u67e5\u770b PID\u3001\u4f7f\u7528\u8005\u548c\u547d\u4ee4\u3002\u5feb\u901f\u5b9a\u4f4d\u4e26\u89e3\u6c7a\u9023\u63a5\u57e0\u885d\u7a81\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Screenshot-2026-11-05-163039.png\",\"contentUrl\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Screenshot-2026-11-05-163039.png\",\"width\":765,\"height\":503,\"caption\":\"fuser \u986f\u793a\u5360\u7528 TCP \u9023\u63a5\u57e0\u7684\u884c\u7a0b\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/knowledge-tc\\\/how-to-use-fuser-to-identify-the-process-occupying-a-port\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#website\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/\",\"name\":\"Varidata Limited\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#organization\",\"name\":\"Varidata\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/varidata_logo_white_-748x480_hor_web-1.png\",\"contentUrl\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/varidata_logo_white_-748x480_hor_web-1.png\",\"width\":248,\"height\":94,\"caption\":\"Varidata\"},\"image\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/#\\\/schema\\\/person\\\/8fe12b0dd65fd2ba7ccf0dea7d14de6c\",\"name\":\"Amy Yan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/087e2e5704ab9b17ce8a5ebfda282b5f9d46ea62ff6c00f7b19ef4d6ce4e83aa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/087e2e5704ab9b17ce8a5ebfda282b5f9d46ea62ff6c00f7b19ef4d6ce4e83aa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/087e2e5704ab9b17ce8a5ebfda282b5f9d46ea62ff6c00f7b19ef4d6ce4e83aa?s=96&d=mm&r=g\",\"caption\":\"Amy Yan\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b","description":"\u4f7f\u7528 fuser \u6aa2\u67e5\u54ea\u500b\u884c\u7a0b\u5360\u7528\u4e86\u9023\u63a5\u57e0\uff1a\u57f7\u884c fuser -v -n tcp [port] \u53ef\u67e5\u770b PID\u3001\u4f7f\u7528\u8005\u548c\u547d\u4ee4\u3002\u5feb\u901f\u5b9a\u4f4d\u4e26\u89e3\u6c7a\u9023\u63a5\u57e0\u885d\u7a81\u3002","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.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/","og_locale":"zh_TW","og_type":"article","og_title":"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b","og_url":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/","og_site_name":"Varidata Limited","article_published_time":"2026-11-05T08:31:19+00:00","article_modified_time":"2026-11-05T08:34:23+00:00","og_image":[{"width":765,"height":503,"url":"https:\/\/www.varidata.com\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-05-163039.png","type":"image\/png"}],"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/#article","isPartOf":{"@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/"},"author":"Varidata","headline":"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b","datePublished":"2026-11-05T08:31:19+00:00","dateModified":"2026-11-05T08:34:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/"},"wordCount":183,"publisher":{"@id":"https:\/\/www.varidata.com\/zh-tw\/#organization"},"image":{"@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/#primaryimage"},"thumbnailUrl":"https:\/\/www.varidata.com\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-05-163039.png","articleSection":["Varidata \u77e5\u8b58\u6587\u6a94"],"inLanguage":"zh-TW"},{"@type":"WebPage","@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/","url":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/","name":"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b","isPartOf":{"@id":"https:\/\/www.varidata.com\/zh-tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/#primaryimage"},"image":{"@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/#primaryimage"},"thumbnailUrl":"https:\/\/www.varidata.com\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-05-163039.png","datePublished":"2026-11-05T08:31:19+00:00","dateModified":"2026-11-05T08:34:23+00:00","description":"\u4f7f\u7528 fuser \u6aa2\u67e5\u54ea\u500b\u884c\u7a0b\u5360\u7528\u4e86\u9023\u63a5\u57e0\uff1a\u57f7\u884c fuser -v -n tcp [port] \u53ef\u67e5\u770b PID\u3001\u4f7f\u7528\u8005\u548c\u547d\u4ee4\u3002\u5feb\u901f\u5b9a\u4f4d\u4e26\u89e3\u6c7a\u9023\u63a5\u57e0\u885d\u7a81\u3002","breadcrumb":{"@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/#primaryimage","url":"https:\/\/www.varidata.com\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-05-163039.png","contentUrl":"https:\/\/www.varidata.com\/wp-content\/uploads\/2026\/11\/Screenshot-2026-11-05-163039.png","width":765,"height":503,"caption":"fuser \u986f\u793a\u5360\u7528 TCP \u9023\u63a5\u57e0\u7684\u884c\u7a0b"},{"@type":"BreadcrumbList","@id":"https:\/\/www.varidata.com\/zh-tw\/knowledge-tc\/how-to-use-fuser-to-identify-the-process-occupying-a-port\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.varidata.com\/zh-tw\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u4f7f\u7528 fuser \u8b58\u5225\u5360\u7528\u9023\u63a5\u57e0\u7684\u884c\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.varidata.com\/zh-tw\/#website","url":"https:\/\/www.varidata.com\/zh-tw\/","name":"Varidata Limited","description":"","publisher":{"@id":"https:\/\/www.varidata.com\/zh-tw\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.varidata.com\/zh-tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/www.varidata.com\/zh-tw\/#organization","name":"Varidata","url":"https:\/\/www.varidata.com\/zh-tw\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.varidata.com\/zh-tw\/#\/schema\/logo\/image\/","url":"https:\/\/www.varidata.com\/wp-content\/uploads\/2021\/09\/varidata_logo_white_-748x480_hor_web-1.png","contentUrl":"https:\/\/www.varidata.com\/wp-content\/uploads\/2021\/09\/varidata_logo_white_-748x480_hor_web-1.png","width":248,"height":94,"caption":"Varidata"},"image":{"@id":"https:\/\/www.varidata.com\/zh-tw\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.varidata.com\/zh-tw\/#\/schema\/person\/8fe12b0dd65fd2ba7ccf0dea7d14de6c","name":"Amy Yan","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/secure.gravatar.com\/avatar\/087e2e5704ab9b17ce8a5ebfda282b5f9d46ea62ff6c00f7b19ef4d6ce4e83aa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/087e2e5704ab9b17ce8a5ebfda282b5f9d46ea62ff6c00f7b19ef4d6ce4e83aa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/087e2e5704ab9b17ce8a5ebfda282b5f9d46ea62ff6c00f7b19ef4d6ce4e83aa?s=96&d=mm&r=g","caption":"Amy Yan"}}]}},"_links":{"self":[{"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/posts\/37015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/comments?post=37015"}],"version-history":[{"count":2,"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/posts\/37015\/revisions"}],"predecessor-version":[{"id":37017,"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/posts\/37015\/revisions\/37017"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/media\/37012"}],"wp:attachment":[{"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/media?parent=37015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/categories?post=37015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.varidata.com\/zh-tw\/wp-json\/wp\/v2\/tags?post=37015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}