{"id":41837,"date":"2025-06-05T07:16:04","date_gmt":"2025-06-04T23:16:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/41837.html"},"modified":"2025-06-05T07:16:04","modified_gmt":"2025-06-04T23:16:04","slug":"%e7%a9%bf%e8%b6%8a%e6%96%87%e4%bb%b6%e4%b9%8b%e6%b5%b7%ef%bc%9alinux%e9%93%be%e6%8e%a5%e4%b8%8e%e5%ba%93%e7%9a%84%e5%a5%87%e5%b9%bb%e6%97%85%e7%a8%8b%ef%bc%8c%e8%bd%af%e7%a1%ac%e8%bf%9e%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/41837.html","title":{"rendered":"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u5f15\u8a00<\/li>\n<li>1\u3001\u8f6f\u786c\u94fe\u63a5<\/li>\n<li>\n<ul>\n<li>1.1\u3001\u57fa\u672c\u8ba4\u77e5<\/li>\n<li>1.2\u3001\u5b9e\u73b0\u539f\u7406<\/li>\n<li>1.3\u3001\u5e94\u7528\u573a\u666f<\/li>\n<li>1.4\u3001\u53d6\u6d88\u94fe\u63a5<\/li>\n<li>1.5\u3001ACM\u65f6\u95f4<\/li>\n<\/ul>\n<\/li>\n<li>2\u3001\u52a8\u9759\u6001\u5e93<\/li>\n<li>\n<ul>\n<li>2.1\u3001\u8ba4\u8bc6\u5e93<\/li>\n<li>2.2\u3001\u5e93\u7684\u4f5c\u7528<\/li>\n<\/ul>\n<\/li>\n<li>3\u3001\u5236\u4f5c\u9759\u6001\u5e93<\/li>\n<li>\n<ul>\n<li>3.2\u3001\u9759\u6001\u5e93\u7684\u4f7f\u7528<\/li>\n<\/ul>\n<\/li>\n<li>4\u3001\u5236\u4f5c\u52a8\u6001\u5e93<\/li>\n<li>\n<ul>\n<li>4.1\u3001\u52a8\u6001\u5e93\u7684\u6253\u5305<\/li>\n<li>4.3\u3001\u52a8\u6001\u5e93\u7684\u94fe\u63a5\u539f\u7406<\/li>\n<\/ul>\n<\/li>\n<li>5\u3001\u52a8\u6001\u5e93\u77e5\u8bc6\u8865\u5145<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b10d464.gif\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <\/p>\n<h2>\u5f15\u8a00<\/h2>\n<p>\u5728\u8ba1\u7b97\u673a\u7684\u65e0\u5f62\u4e16\u754c\u4e2d&#xff0c;\u6570\u636e\u5982\u6cb3\u6d41\u822c\u6d41\u6dcc&#xff0c;\u800c\u6587\u4ef6\u7cfb\u7edf\u5219\u662f\u6cb3\u9053\u7684\u8bbe\u8ba1\u8005\u3002Linux&#xff0c;\u8fd9\u4f4d\u53e4\u8001\u800c\u777f\u667a\u7684\u5b88\u62a4\u8005&#xff0c;\u4e3a\u6211\u4eec\u94fa\u8bbe\u4e86\u4e00\u6761\u901a\u5f80\u6570\u5b57\u738b\u56fd\u6df1\u5904\u7684\u9053\u8def\u3002<\/p>\n<p>\u4eca\u5929&#xff0c;\u8ba9\u6211\u4eec\u8e0f\u4e0a\u4e00\u6bb5\u5947\u5999\u7684\u65c5\u7a0b&#xff0c;\u63a2\u7d22Linux\u57fa\u7840I\/O\u4e2d\u90a3\u4e9b\u770b\u4f3c\u5e73\u51e1\u5374\u8574\u542b\u65e0\u9650\u667a\u6167\u7684\u94fe\u63a5\u4e0e\u5e93\u3002<\/p>\n<h2>1\u3001\u8f6f\u786c\u94fe\u63a5<\/h2>\n<h3>1.1\u3001\u57fa\u672c\u8ba4\u77e5<\/h3>\n<p>\u5bf9\u6587\u4ef6\u8fdb\u884c\u8f6f\u786c\u94fe\u63a5\u975e\u5e38\u7b80\u5355&#xff0c;\u53ea\u9700\u8981\u901a\u8fc7ln -s\u6216ln\u5bf9\u6587\u4ef6\u8fdb\u884c\u94fe\u63a5\u5373\u53ef&#xff0c;\u751f\u6210\u7684\u94fe\u63a5\u6587\u4ef6\u7c7b\u578b\u4e3a l&#xff08;\u666e\u901a\u6587\u4ef6\u4e3a -&#xff0c;\u76ee\u5f55\u6587\u4ef6\u4e3a d&#xff09;<\/p>\n<p>\u5bf9\u6587\u4ef6test.cc\u8fdb\u884c\u8f6f\u94fe\u63a5&#xff0c;\u751f\u6210\u8f6f\u94fe\u63a5\u6587\u4ef6 my-sort&#xff0c;\u5176\u4e2d\u8f6f\u94fe\u63a5\u6587\u4ef6\u540d\u53ef\u4ee5\u81ea\u5b9a\u4e49<\/p>\n<p><span class=\"token function\">ln<\/span> <span class=\"token parameter variable\">-s<\/span> test.cc my-soft.cc<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u5728\u540e\u7eed\u5bf9\u8f6f\u94fe\u63a5\u7f16\u8bd1\u751f\u6210\u53ef\u6267\u884c\u7a0b\u5e8f\u65f6&#xff0c;\u5982\u679cmy-soft.cc\u6ca1\u6709\u6587\u4ef6\u540e\u7f00&#xff0c;\u4f1a\u5b58\u5728\u65e0\u6cd5\u8bc6\u522b\u95ee\u9898 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b127aa6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b14017c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u751f\u6210\u786c\u94fe\u63a5\u6587\u4ef6\u5c31\u66f4\u7b80\u5355\u4e86&#xff0c;\u5bf9\u6587\u4ef6 test.cc \u8fdb\u884c\u786c\u8fde\u63a5&#xff0c;\u751f\u6210\u786c\u8fde\u63a5\u6587\u4ef6 my-hard&#xff0c;\u5176\u4e2d\u786c\u94fe\u63a5\u6587\u4ef6\u540d\u4e5f\u53ef\u4ee5\u81ea\u5b9a\u4e49<\/p>\n<p><span class=\"token function\">ln<\/span> tets.cc my-hard<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b15bfde.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u751f\u6210\u7684\u8f6f\u786c\u94fe\u63a5\u6587\u4ef6\u5982\u4f55\u4f7f\u7528\u5462&#xff1f;<\/p>\n<ul>\n<li>\u50cf\u6e90\u6587\u4ef6\u4e00\u6837\u4f7f\u7528\u5373\u53ef&#xff0c;\u7ed3\u679c\u4e00\u6a21\u4e00\u6837&#xff08;\u56e0\u4e3a\u5f53\u524d\u8f6f\u786c\u94fe\u63a5\u7684\u90fd\u662f\u540c\u4e00\u4e2a\u6e90\u6587\u4ef6&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b16ff4f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u867d\u7136\u6b64\u65f6\u7684\u8f6f\u786c\u94fe\u63a5\u6267\u884c\u7ed3\u679c\u4e00\u81f4&#xff0c;\u4f46\u8fd9\u4e24\u79cd\u94fe\u63a5\u65b9\u5f0f\u5728\u672c\u8d28\u4e0a\u6709\u5f88\u5927\u533a\u522b<\/li>\n<li>\u8f6f\u94fe\u63a5\u6587\u4ef6\u7684inode\u7f16\u53f7\u4e0e\u6e90\u6587\u4ef6\u4e0d\u540c&#xff08;\u72ec\u7acb\u5b58\u5728&#xff09;&#xff0c;\u8f6f\u8fde\u63a5\u6587\u4ef6\u6bd4\u6e90\u6587\u4ef6\u5c0f\u5f97\u591a&#xff0c;\u5e76\u4e14 \u8f6f\u8fde\u63a5\u6587\u4ef6-&gt;\u6e90\u6587\u4ef6<\/li>\n<li>\u786c\u94fe\u63a5\u6587\u4ef6\u4e0e\u6e90\u6587\u4ef6\u5171\u7528\u4e00\u4e2a inode \u7f16\u53f7&#xff08;\u5bf9\u6e90\u6587\u4ef6\u5176\u522b\u540d&#xff09;&#xff0c;\u786c\u94fe\u63a5\u6587\u4ef6\u4e0e\u6e90\u6587\u4ef6\u4e00\u6837\u5927&#xff0c;\u5e76\u4e14\u786c\u94fe\u63a5\u6587\u4ef6\u4e0e\u6e90\u6587\u4ef6\u7684\u94fe\u63a5\u6570\u53d8\u6210\u4e86 2 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b17ce77.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u8f6f\u94fe\u63a5\u6587\u4ef6\u4f9d\u8d56\u4e8e\u6e90\u6587\u4ef6&#xff0c;\u800c\u786c\u94fe\u63a5\u6587\u4ef6\u662f\u6e90\u6587\u4ef6\u7684\u522b\u540d<\/li>\n<\/ul>\n<p>\u5f53\u6211\u4eec\u5c06\u6e90\u6587\u4ef6\u5220\u9664\u540e&#xff0c;\u8f6f\u8fde\u63a5\u5931\u6548&#xff1b;\u786c\u94fe\u63a5\u4ecd\u7136\u6709\u6548&#xff0c;\u4e0d\u8fc7\u786c\u94fe\u63a5\u6570\u53d8\u4e3a\u4e86 1<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b196a05.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>1.2\u3001\u5b9e\u73b0\u539f\u7406<\/h3>\n<p>\u8f6f\u94fe\u63a5\u53c8\u79f0\u4e3a\u7b26\u53f7\u94fe\u63a5&#xff0c;\u5b83\u662f\u4e00\u4e2a\u5355\u72ec\u5b58\u5728\u7684\u6587\u4ef6&#xff0c;\u62e5\u6709\u5c5e\u4e8e\u81ea\u5df1\u7684inode\u5c5e\u6027\u53ca\u76f8\u5e94\u7684\u6587\u4ef6\u5185\u5bb9&#xff0c;\u4e0d\u8fc7\u5728\u8f6f\u8fde\u63a5\u7684Data block\u4e2d\u5b58\u653e\u7684\u662f\u6e90\u6587\u4ef6\u7684\u5730\u5740&#xff0c;\u56e0\u6b64\u8f6f\u8fde\u63a5\u5f88\u5c0f&#xff0c;\u5e76\u4e14\u975e\u5e38\u4f9d\u8d56\u4e8e\u6e90\u6587\u4ef6<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b1a6236.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>\n<p>\u56e0\u6b64\u5982\u679c\u6e90\u6587\u4ef6\u88ab\u5220\u9664\u4e86&#xff0c;\u90a3\u4e48\u5728\u6267\u884c\u8f6f\u8fde\u63a5\u6587\u4ef6\u65f6&#xff0c;\u5176\u4e2d\u7684\u5730\u5740\u5c31\u662f\u4e00\u4e2a\u65e0\u6548\u5730\u5740&#xff08;\u76ee\u6807\u6587\u4ef6\u5df2\u4e22\u5931&#xff09;&#xff0c;\u6b64\u65f6\u5c31\u4f1a\u62a5\u9519 No such file or directory<\/p>\n<\/li>\n<li>\n<p>\u5047\u8bbe\u53ea\u662f\u5355\u7eaf\u7684\u5220\u9664\u8f6f\u8fde\u63a5\u6587\u4ef6&#xff0c;\u90a3\u4e48\u5bf9\u6e90\u6587\u4ef6\u7684\u5185\u5bb9\u6ca1\u6709\u4e1d\u6beb\u5f71\u54cd&#xff0c;\u5c31\u597d\u6bd4 Windows \u684c\u9762\u4e0a\u7684\u5feb\u6377\u65b9\u5f0f&#xff0c;\u6709\u7684\u4eba\u4ee5\u4e3a\u5c06\u5feb\u6377\u65b9\u5f0f&#xff08;\u8f6f\u94fe\u63a5&#xff09;\u6587\u4ef6\u5220\u9664\u4e86&#xff0c;\u5c31\u662f\u5728 \u201c\u5378\u8f7d\u201d \u8f6f\u4ef6&#xff0c;\u5176\u5b9e\u4e0d\u662f&#xff0c;\u5982\u679c\u60f3\u5378\u8f7d\u8f6f\u4ef6&#xff0c;\u76f4\u63a5\u5c06\u5176\u6e90\u6587\u4ef6\u76f8\u5173\u6587\u4ef6\u5939\u5168\u90e8\u5220\u9664\u5373\u53ef<\/p>\n<\/li>\n<li>\n<p>\u786c\u94fe\u63a5\u5e76\u975e\u521b\u5efa\u4e00\u4e2a\u76f8\u540c\u7684\u6587\u4ef6\u8fdb\u884c\u94fe\u63a5&#xff0c;\u800c\u662f\u5728\u6e90\u6587\u4ef6\u6240\u76ee\u5f55\u4e0b\u7684 \u3010inode\u7f16\u53f7 \u4e0e\u6587\u4ef6\u540d\u5bf9\u5e94\u8868\u4e2d\u3011&#xff0c;\u65b0\u589e \u3010inode \u7f16\u53f7\u4e0e\u786c\u94fe\u63a5\u6587\u4ef6\u540d\u3011\u7684\u6620\u5c04\u5173\u7cfb&#xff0c;\u5e76\u5c06 inode \u7ed3\u6784\u4f53\u4e2d\u7684\u5f15\u7528\u8ba1\u6570 &#043;1&#xff0c;\u8868\u793a\u5f53\u524d\u5df2\u6210\u529f\u786c\u94fe\u63a5\u4e0a\u4e86\u4e00\u4e2a\u6587\u4ef6<\/p>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b1be4df.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>\u5f53\u5220\u9664\u5f53\u524dinode\u5bf9\u5e94\u6587\u4ef6\u65f6&#xff0c;\u4f1a \u5148\u5224\u65ad ref_count \u662f\u5426\u4e3a 1&#xff0c;\u5982\u679c\u662f&#xff0c;\u624d\u4f1a\u5c06\u6587\u4ef6\u5185\u5bb9\u53ca\u5176\u5c5e\u6027\u771f\u6b63\u5220\u9664&#xff0c;-<\/li>\n<li>\u5426\u5219\u5220\u9664\u7684\u53ea\u662f \u6587\u4ef6\u540d \u4e0e inode \u7f16\u53f7\u7684\u6620\u5c04\u5173\u7cfb<\/li>\n<\/ul>\n<p>\u8fd9\u4e5f\u5c31\u89e3\u91ca\u4e86\u4e3a\u4ec0\u4e48\u5220\u9664\u6e90\u6587\u4ef6\u540e&#xff0c;\u786c\u94fe\u63a5\u6587\u4ef6\u4e0d\u53d7\u4efb\u4f55\u5f71\u54cd&#xff0c;\u4ec5\u4ec5\u53ea\u662f \u786c\u94fe\u63a5\u6570 &#8211; 1&#xff0c;\u540c\u7406&#xff0c;\u5220\u9664\u786c\u94fe\u63a5\u6587\u4ef6&#xff0c;\u4e5f\u4e0d\u4f1a\u5f71\u54cd\u6e90\u6587\u4ef6<\/p>\n<p>\u4e3a\u4ec0\u4e48\u65b0\u5efa\u76ee\u5f55\u7684\u786c\u94fe\u63a5\u6570\u4e3a 2&#xff1f;<\/p>\n<ul>\n<li>\u56e0\u4e3a\u4e00\u4e2a\u76ee\u5f55\u5728\u65b0\u5efa\u540e&#xff0c;\u5176\u4e2d\u9ed8\u8ba4\u5b58\u5728\u4e24\u4e2a\u9690\u85cf\u6587\u4ef6&#xff1a;. \u4e0e ..<\/li>\n<li>\u5176\u4e2d.\u8868\u793a\u5f53\u524d\u76ee\u5f55&#xff0c;.. \u8868\u793a\u4e0a\u7ea7\u76ee\u5f55 Linux \u4e2d\u7684\u76ee\u5f55\u7ed3\u6784\u4e3a\u591a\u53c9\u6811&#xff0c;\u5373\u5f53\u524d\u8282\u70b9&#xff08;\u76ee\u5f55&#xff09;\u9700\u8981\u4e0e\u7236\u8282\u70b9&#xff08;\u4e0a\u7ea7\u76ee\u5f55&#xff09;\u3001\u5b50\u8282\u70b9&#xff08;\u4e0b\u7ea7\u76ee\u5f55&#xff09;\u5efa\u7acb\u94fe\u63a5\u5173\u7cfb&#xff0c;\u5e76\u4e14\u8fd8\u5f97\u77e5\u9053\u5f53\u76ee\u5f55\u7684\u5730\u5740&#xff0c;\u5426\u5219\u5c31\u4f1a\u5bfc\u81f4\u5207\u6362\u76ee\u5f55\u65f6\u51fa\u73b0\u9519\u8bef<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231602-6840d3b231f92.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4e3a\u4e86\u907f\u514d\u56e0\u7528\u6237\u7684\u8bef\u64cd\u4f5c\u800c\u5bfc\u81f4\u7684\u76ee\u5f55\u73af\u72b6\u95ee\u9898&#xff0c;\u89c4\u5b9a\u7528\u6237\u4e0d\u80fd\u624b\u52a8\u7ed9\u76ee\u5f55\u5efa\u7acb\u786c\u94fe\u63a5\u5173\u7cfb&#xff0c;\u53ea\u80fd\u7531 OS \u81ea\u52a8\u5efa\u7acb\u786c\u94fe\u63a5<\/p>\n<p>\u6bd4\u5982\u521b\u5efa\u65b0\u76ee\u5f55\u540e&#xff0c;\u9ed8\u8ba4\u4e0e\u4e0a\u7ea7\u76ee\u5f55\u548c\u5f53\u524d\u76ee\u5f55\u5efa\u7acb\u786c\u94fe\u63a5\u6587\u4ef6&#xff0c;\u5728\u5f53\u76ee\u5f55\u4e0b\u521b\u5efa\u65b0\u76ee\u5f55\u540e&#xff0c;\u5f53\u524d\u76ee\u5f55\u7684\u786c\u94fe\u63a5\u6570 &#043; 1<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231602-6840d3b24ac08.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5c0f\u6280\u5de7&#xff1a;\u5c06\u76ee\u5f55\u7684\u786c\u94fe\u63a5\u6570 &#8211; 2&#xff0c;\u5c31\u53ef\u4ee5\u77e5\u9053\u8be5\u76ee\u5f55\u4e2d\u6709\u591a\u5c11\u4e2a\u76ee\u5f55\u4e86<\/p>\n<p><span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-d<\/span>\/\/\u53ea\u67e5\u770b\u76ee\u5f55\u6587\u4ef6<\/p>\n<h3>1.3\u3001\u5e94\u7528\u573a\u666f<\/h3>\n<p>\u8f6f\u94fe\u63a5\u53ef\u4ee5\u5f53\u4f5c\u5feb\u6377\u65b9\u5f0f\u4f7f\u7528&#xff0c;\u6bd4\u5982\u5feb\u901f\u8fd0\u884c\u4e00\u4e2a\u85cf\u7684\u5f88\u6df1\u7684\u53ef\u6267\u884c\u7a0b\u5e8f<\/p>\n<p>\u786c\u94fe\u63a5<\/p>\n<ul>\n<li>\u53ef\u4ee5\u7528\u6765\u5f53\u4f5c\u76ee\u5f55\u79fb\u52a8\u7684\u5de5\u5177<\/li>\n<li>\u53ef\u4ee5\u7528\u6765\u7ed9\u91cd\u8981\u7684\u6e90\u6587\u4ef6\u8d77\u522b\u540d\u5e76\u4f7f\u7528&#xff0c;\u4e00\u65e6\u53d1\u751f\u5220\u9664\u7b49\u4e0d\u53ef\u9006\u884c\u4e3a\u65f6&#xff0c;\u53ef\u4ee5\u786e\u4fdd\u6e90\u6587\u4ef6\u7684\u5b89\u5168<\/li>\n<\/ul>\n<p>\u6ce8\u610f&#xff1a; \u786c\u94fe\u63a5\u5e76\u4e0d\u662f\u5c06\u6e90\u6587\u4ef6\u76f4\u63a5\u8fdb\u884c\u5907\u4efd&#xff0c;\u800c\u662f\u65b0\u5efa\u7acb inode \u7f16\u53f7\u4e0e\u786c\u94fe\u63a5\u6587\u4ef6\u540d\u7684\u6620\u5c04\u5173\u7cfb&#xff0c;\u540c\u65f6 struct inode \u4e2d\u7684\u5f15\u7528\u8ba1\u6570 ref_count&#043;&#043;&#xff0c;\u53ea\u6709\u5f53 ref_count &#061;&#061; 1 \u65f6\u624d\u4f1a\u771f\u6b63\u5220\u9664\u6587\u4ef6\u5185\u5bb9\u53ca\u5c5e\u6027&#xff0c;\u5426\u5219\u90fd\u53ea\u662f\u5728\u53d6\u6d88\u6620\u5c04\u5173\u7cfb\u548c ref_count&#8211;<\/p>\n<h3>1.4\u3001\u53d6\u6d88\u94fe\u63a5<\/h3>\n<p>\u53d6\u6d88\u94fe\u63a5\u7684\u65b9\u5f0f\u6709\u4e24\u79cd&#xff1a;<\/p>\n<ul>\n<li>\u76f4\u63a5\u5220\u9664\u94fe\u63a5\u6587\u4ef6<\/li>\n<li>\u901a\u8fc7 unlink \u53d6\u6d88\u94fe\u63a5\u5173\u7cfb<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231602-6840d3b27158e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>1.5\u3001ACM\u65f6\u95f4<\/h3>\n<p>\u6bcf\u4e00\u4e2a\u6587\u4ef6\u90fd\u6709\u4e09\u4e2a\u65f6\u95f4&#xff1a;<\/p>\n<ul>\n<li>\u8bbf\u95ee Access<\/li>\n<li>\u4fee\u6539\u5c5e\u6027 Change<\/li>\n<li>\u4fee\u6539\u5185\u5bb9 Modify<\/li>\n<\/ul>\n<p>\u7b80\u79f0\u4e3a ACM \u65f6\u95f4<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7stat\u67e5\u770b\u6307\u5b9a\u6587\u4ef6\u7684 ACM \u65f6\u95f4\u4fe1\u606f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231602-6840d3b29d59f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>2\u3001\u52a8\u9759\u6001\u5e93<\/h2>\n<p>\u63a5\u4e0b\u6765\u5b66\u4e60\u52a8\u9759\u6001\u5e93\u7684\u76f8\u5173\u5185\u5bb9&#xff0c;\u4e86\u89e3\u7a0b\u5e8f\u8fd0\u884c\u65f6\u662f\u5982\u4f55\u8c03\u7528\u8d44\u6e90\u7684<\/p>\n<h3>2.1\u3001\u8ba4\u8bc6\u5e93<\/h3>\n<p>\u5e38\u89c1\u7684\u5e93\u6587\u4ef6&#xff1a;stdio.h\u3001stdlib.h\u3001string.h \u7b49<\/p>\n<p>\u5e93\u5206\u4e3a \u52a8\u6001\u5e93 \u548c \u9759\u6001\u5e93<\/p>\n<ul>\n<li>Linux \u4e2d&#xff0c;.a \u540e\u7f00\u4e3a\u9759\u6001\u5e93&#xff0c;.so \u540e\u7f00\u4e3a\u52a8\u6001\u5e93<\/li>\n<li>Windows \u4e2d&#xff0c;.lib \u540e\u7f00\u4e3a\u9759\u6001\u5e93&#xff0c;.dll \u540e\u7f00\u4e3a\u52a8\u6001\u5e93<\/li>\n<\/ul>\n<p>\u867d\u7136\u4e0d\u540c\u73af\u5883\u4e0b\u7684\u540e\u7f00\u6709\u6240\u4e0d\u540c&#xff0c;\u4f46\u5176\u5de5\u4f5c\u539f\u7406\u662f\u4e00\u81f4\u7684<\/p>\n<p>\u5e93\u547d\u540d<\/p>\n<ul>\n<li>\u6bd4\u5982 libstdc&#043;&#043;.so.6<\/li>\n<li>\u53bb\u6389\u524d\u7f00\u8ddf\u540e\u7f00,\u6700\u7ec8\u5e93\u540d\u4e3a stdc&#043;&#043;<\/li>\n<\/ul>\n<p>\u67e5\u770b\u5f53\u524d\u73af\u5883\u4e2d\u7684\u5e93\u6587\u4ef6<\/p>\n<p><span class=\"token function\">ls<\/span> \/usr\/lib\/x86 <span class=\"token number\">64<\/span>-linux-gnu\/libc*<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231602-6840d3b2b09fd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>\u65e0\u8bba\u662f C\u8bed\u8a00 \u8fd8\u662f C&#043;&#043;&#xff0c;\u5728\u7f16\u5199\u7a0b\u5e8f\u65f6&#xff0c;\u4e00\u5b9a\u79bb\u4e0d\u5f00\u5e93\u6587\u4ef6&#xff0c;\u6bd4\u5982\u4e4b\u524d\u6a21\u62df\u5b9e\u73b0\u7684 FILE \u7c7b\u578b&#xff0c;\u5c31\u4f4d\u4e8e stdio.h \u8fd9\u4e2a\u5e93\u4e2d\u3002<\/li>\n<li>\u52a8\u6001\u5e93\u4f18\u52bf\u6bd4\u9759\u6001\u5e93\u660e\u663e&#xff0c;\u56e0\u6b64\u5728\u7f16\u8bd1\u4ee3\u7801\u65f6&#xff0c;\u9ed8\u8ba4\u91c7\u7528\u52a8\u6001\u94fe\u63a5\u7684\u65b9\u5f0f&#xff0c;\u5982\u679c\u60f3\u6307\u5b9a\u4e3a\u9759\u6001\u94fe\u63a5\u7f16\u8bd1&#xff0c;\u53ea\u9700\u8981\u5728 gcc\/g&#043;&#043; \u8bed\u53e5\u540e\u9762\u52a0\u4e0a -static \u5373\u53ef&#xff08;\u524d\u63d0\u662f\u5f97\u6709\u9759\u6001\u5e93&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231602-6840d3b2eb1c8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u89c2\u5bdf\u53ef\u5f97&#xff0c;\u9759\u6001\u5e93\u7f16\u8bd1\u5f97\u5230\u7684\u7a0b\u5e8f\u5927\u5c0f\u8fdc\u5927\u4e8e\u52a8\u6001\u5e93\u3002<\/li>\n<\/ul>\n<p>\u5173\u4e8e\u52a8\u9759\u6001\u5e93\u7684\u4f18\u7f3a\u70b9\u53ef\u4ee5\u770b\u770b\u4e0b\u9762\u8fd9\u4e2a\u8868\u683c&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231603-6840d3b31272e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6ce8\u610f&#xff1a; \u9759\u6001\u5e93\u662f\u5c06\u6240\u9700\u8981\u7684\u51fd\u6570\u4ee3\u7801\u62f7\u8d1d\u5230\u6e90\u6587\u4ef6\u4e2d\u76f4\u63a5\u4f7f\u7528&#xff0c;\u800c\u52a8\u6001\u5e93\u662f\u901a\u8fc7\u52a8\u6001\u94fe\u63a5\u7684\u65b9\u5f0f&#xff0c;\u8fdb\u884c\u51fd\u6570\u94fe\u63a5\u4f7f\u7528<\/p>\n<h3>2.2\u3001\u5e93\u7684\u4f5c\u7528<\/h3>\n<p>\u6240\u4ee5&#xff0c;\u5e93\u6587\u4ef6\u5230\u5e95\u6709\u4ec0\u4e48\u7528&#xff1f;<\/p>\n<ul>\n<li>\u63d0\u9ad8\u5f00\u53d1\u6548\u7387<\/li>\n<\/ul>\n<p>\u7cfb\u7edf\u5df2\u7ecf\u9884\u88c5\u4e86 C\/C&#043;&#043; \u7684\u5934\u6587\u4ef6\u548c\u5e93\u6587\u4ef6&#xff0c;\u5934\u6587\u4ef6\u63d0\u4f9b\u8bf4\u660e&#xff0c;\u5e93\u6587\u4ef6\u63d0\u4f9b\u65b9\u6cd5\u7684\u5b9e\u73b0<\/p>\n<ul>\n<li>\u5934\u548c\u5e93\u662f\u6709\u5bf9\u5e94\u5173\u7cfb\u7684&#xff0c;\u9700\u8981\u7ec4\u5408\u4f7f\u7528<\/li>\n<li>\u5934\u6587\u4ef6\u5728\u9884\u5904\u7406\u9636\u6bb5\u5c31\u5df2\u7ecf\u5f15\u5165\u4e86&#xff0c;\u94fe\u63a5\u7684\u672c\u8d28\u5c31\u662f\u5728\u94fe\u63a5\u5e93<\/li>\n<\/ul>\n<p>\u7b80\u8a00\u4e4b&#xff0c;\u5982\u679c\u6ca1\u6709\u5e93\u6587\u4ef6&#xff0c;\u90a3\u4e48\u4f60\u5728\u5f00\u53d1\u65f6&#xff0c;\u9700\u8981\u81ea\u5df1\u624b\u52a8\u5c06 printf \u7b49\u9ad8\u9891\u51fd\u6570\u7f16\u5199\u51fa\u6765&#xff0c;\u56e0\u6b64\u5e93\u6587\u4ef6\u53ef\u4ee5\u63d0\u9ad8\u6211\u4eec\u7684\u5f00\u53d1\u6548\u7387&#xff0c;\u6bd4\u5982 Python \u4e2d\u5c31\u6709\u5f88\u591a\u73b0\u6210\u7684\u5e93\u51fd\u6570\u53ef\u4ee5\u4f7f\u7528&#xff0c;\u6548\u7387\u5f88\u9ad8<\/p>\n<p>\u8bed\u6cd5\u63d0\u793a\u662f\u5982\u4f55\u505a\u5230\u7684&#xff1f;<\/p>\n<li>\u5b89\u88c5\u5f00\u53d1\u73af\u5883<\/li>\n<ul>\n<li>\u5b9e\u9645\u4e0a\u662f\u5728\u5b89\u88c5\u7f16\u8bd1\u5668\u3001\u5f00\u53d1\u8bed\u8a00\u914d\u5957\u7684\u5e93\u548c\u5934\u6587\u4ef6<\/li>\n<\/ul>\n<li>\n<p>\u7f16\u8bd1\u5668\u7684 \u8bed\u6cd5\u63d0\u793a\u529f\u80fd\u6765\u6e90\u4e8e\u5934\u6587\u4ef6&#xff08;\u8bed\u6cd5\u63d0\u793a\u5176\u5b9e\u5c31\u662f\u641c\u7d22&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6211\u4eec\u5728\u5199\u4ee3\u7801\u65f6&#xff0c;\u5f00\u53d1\u73af\u5883\u662f\u600e\u4e48\u77e5\u9053\u8bed\u6cd5\u9519\u8bef\u6216\u5176\u4ed6\u9519\u8bef\u7684&#xff1f;<\/p>\n<\/li>\n<ul>\n<li>\u7f16\u8bd1\u5668\u6709\u547d\u4ee4\u884c\u6a21\u5f0f&#xff0c;\u8fd8\u6709\u5176\u4ed6\u81ea\u52a8\u5316\u6a21\u5f0f&#xff0c;\u7f16\u5199\u4ee3\u7801\u65f6&#xff0c;\u4e0d\u65ad\u8fdb\u884c\u4e3b\u52a8\u7f16\u8bd1&#xff0c;\u6392\u67e5\u9519\u8bef<\/li>\n<\/ul>\n<h2>3\u3001\u5236\u4f5c\u9759\u6001\u5e93<\/h2>\n<p>\u73b0\u5728\u6709\u4e00\u4e9b\u7b80\u5355\u7684\u8ba1\u7b97 demo \u51fd\u6570&#xff0c;\u80fd\u6ee1\u8db3\u6574\u578b\u7684 \u00b1 \u8ba1\u7b97&#xff0c;\u5c06\u8fd9\u4e9b\u4ee3\u7801\u4f5c\u4e3a\u5e93\u8fdb\u884c\u6253\u5305 myadd.h<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">pragma<\/span> <span class=\"token expression\">once<\/span><\/span><\/p>\n<p><span class=\"token comment\">\/\/\u58f0\u660e\u529f\u80fd<\/span><br \/>\n<span class=\"token keyword\">int<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> x<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> y<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>myadd.c<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;myadd.h&#034;<\/span><\/span><\/p>\n<p><span class=\"token comment\">\/\/\u5b9a\u4e49\u529f\u80fd<\/span><br \/>\n<span class=\"token keyword\">int<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> x<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> y<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> x <span class=\"token operator\">&#043;<\/span> y<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>mysub.h<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">pragma<\/span> <span class=\"token expression\">once<\/span><\/span><\/p>\n<p><span class=\"token comment\">\/\/\u58f0\u660e\u529f\u80fd<\/span><br \/>\n<span class=\"token keyword\">int<\/span> <span class=\"token function\">sub<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> x<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> y<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>mysub.c<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;mysub.h&#034;<\/span><\/span><\/p>\n<p><span class=\"token comment\">\/\/\u5b9a\u4e49\u529f\u80fd<\/span><br \/>\n<span class=\"token keyword\">int<\/span> <span class=\"token function\">sub<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> x<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> y<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> x <span class=\"token operator\">&#8211;<\/span> y<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4e3b\u51fd\u6570\u4e2d\u5c06\u5bf9\u8fd9\u4e9b\u81ea\u5b9a\u4e49\u7684\u5e93\u51fd\u6570\u8fdb\u884c\u8c03\u7528 test.c<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;stdio.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;myadd.h&#034;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;mysub.h&#034;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token function\">printf<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;2 &#043; 3 &#061; %d\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">printf<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;18 &#8211; 6 &#061; %d\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">sub<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">18<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">6<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>3.1\u3001\u9759\u6001\u5e93\u7684\u6253\u5305 \u9759\u6001\u5e93\u7684\u6253\u5305\u4e3b\u8981\u5206\u4e3a\u4ee5\u4e0b\u4e24\u6b65&#xff1a;<\/p>\n<ul>\n<li>\u5c06\u6e90\u6587\u4ef6\u8fdb\u884c \u9884\u5904\u7406-&gt;\u7f16\u8bd1-&gt;\u6c47\u7f16&#xff0c;\u751f\u6210\u53ef\u94fe\u63a5\u7684\u4e8c\u8fdb\u5236 .o \u6587\u4ef6<\/li>\n<li>\u901a\u8fc7\u6307\u4ee4\u5c06 .o \u6587\u4ef6\u6253\u5305\u4e3a\u9759\u6001\u5e93<\/li>\n<\/ul>\n<p>\u5c06\u6587\u4ef6\u7f16\u8bd1\u4e3a .o \u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n<p>gcc <span class=\"token operator\">&#8211;<\/span>c myadd<span class=\"token punctuation\">.<\/span>c mysub<span class=\"token punctuation\">.<\/span>c<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231603-6840d3b334ffd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5c06\u6240\u6709\u7684.o\u6587\u4ef6\u6253\u5305\u4e3a\u4e00\u4e2a\u9759\u6001\u5e93&#xff08;\u5e93\u540d\u81ea\u5b9a\u4e49&#xff09; \u5176\u4e2d\u7684mycalc\u4e3a\u5e93\u540d<\/p>\n<p>ar <span class=\"token parameter variable\">-rc<\/span> libmycalc.a *.o<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231603-6840d3b359cb6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>ar \u662f GNU \u63d0\u4f9b\u7684\u5f52\u6863\u5de5\u5177&#xff0c;\u5e38\u7528\u6765\u5c06\u76ee\u6807\u6587\u4ef6\u6253\u5305\u4e3a\u9759\u6001\u5e93<\/li>\n<li>\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528 ar \u53cd\u5411\u67e5\u770b\u9759\u6001\u5e93\u4e2d\u7684\u5177\u4f53\u6587\u4ef6 ar -tv \u9759\u6001\u5e93\u6587\u4ef6<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231603-6840d3b365430.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u83b7\u5f97\u9759\u6001\u5e93\u540e&#xff0c;\u5c31\u53ef\u4ee5\u8fdb\u884c\u4f7f\u7528\u4e86<\/p>\n<p>\u6ce8&#xff1a;\u6b64\u65f6\u7684 .h\u3001.c\u3001.o \u6587\u4ef6\u4f4d\u4e8e lesson20 \u6587\u4ef6\u5939\u4e2d&#xff0c;\u800c\u9759\u6001\u5e93\u6587\u4ef6 .a \u4f4d\u4e8emylib\u6587\u4ef6\u5939\u4e2d<\/p>\n<h3>3.2\u3001\u9759\u6001\u5e93\u7684\u4f7f\u7528<\/h3>\n<p>\u65b9\u6cd5\u4e00&#xff1a;\u901a\u8fc7\u6307\u5b9a\u8def\u5f84\u4f7f\u7528\u9759\u6001\u5e93<\/p>\n<p>\u5982\u679c\u76f4\u63a5\u7f16\u8bd1\u7a0b\u5e8f&#xff0c;\u4f1a\u51fa\u73b0\u7f16\u8bd1\u5931\u8d25\u7684\u60c5\u51b5&#xff0c;\u56e0\u4e3a\u7f16\u8bd1\u5668\u4e0d\u8ba4\u8bc6\u7b2c\u4e09\u65b9\u5e93&#xff08;\u9700\u8981\u63d0\u4f9b\u7b2c\u4e09\u65b9\u5e93\u7684\u8def\u5f84\u53ca\u5e93\u540d&#xff09;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231603-6840d3b36df9c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7b2c\u4e00\u65b9\u5e93&#xff1a;\u8bed\u8a00\u63d0\u4f9b \u7b2c\u4e8c\u65b9\u5e93&#xff1a;\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b \u7b2c\u4e09\u65b9\u5e93&#xff1a;other \u63d0\u4f9b\u7684\u5e93&#xff0c;\u6bd4\u5982\u5f53\u524d\u6211\u4eec\u76f4\u63a5\u6253\u5305\u7684\u9759\u6001\u5e93<\/p>\n<p>\u5bf9\u4e8e\u81ea\u5df1\u5199\u7684\u7684\u7b2c\u4e09\u5e93\u7684\u4f7f\u7528&#xff0c;\u9700\u8981\u6807\u6ce8\u4e09\u4e2a\u53c2\u6570&#xff1a;<\/p>\n<p>-I \u6240\u9700\u5934\u6587\u4ef6\u7684\u8def\u5f84 \u9700\u8981\u5c06\u6240\u9700\u5934\u6587\u4ef6\u7684\u8def\u5f84\u52a0\u4e0a&#xff0c;\u56e0\u4e3a\u6b64\u65f6\u8def\u5f84\u5df2\u7ecf\u4e3a\u6240\u9700\u8def\u5f84&#xff0c;\u56e0\u6b64\u6b64\u5904\u4e3a .\/ -L \u6240\u9700\u5e93\u6587\u4ef6\u7684\u8def\u5f84 \u8fd9\u91cc\u52a0\u7684\u662f\u5e93\u6587\u4ef6\u7684\u8def\u5f84&#xff0c;\u4e5f\u4e3a .\/ -l \u5f85\u94fe\u63a5\u9759\u6001\u5e93\u540d \u6240\u9700\u8981\u94fe\u63a5\u7684\u9759\u6001\u5e93\u540d\u5b57&#xff0c;\u8fd9\u91cc\u4e3a mycalc<\/p>\n<p> gcc <span class=\"token parameter variable\">-o<\/span> ret test.c  -I.\/ -L.\/ <span class=\"token parameter variable\">-lmycalc<\/span><\/p>\n<p><img decoding=\"async\" src=\"2025-06-05rxx2yqcombi.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4e3a\u4ec0\u4e48\u7f16\u8bd1 C\/C&#043;&#043; \u4ee3\u7801\u65f6&#xff0c;\u4e0d\u9700\u8981\u6307\u5b9a\u8def\u5f84&#xff1f;<\/p>\n<ul>\n<li>\u56e0\u4e3a\u8fd9\u4e9b\u5e93\u90fd\u662f\u7cfb\u7edf\u7ea7\u7684&#xff0c;gcc\/g&#043;&#043; \u9ed8\u8ba4\u627e\u7684\u5c31\u662f stdc\/stdc&#043;&#043; \u5e93<\/li>\n<\/ul>\n<p>\u65b9\u6cd5\u4e8c&#xff1a;\u5c06\u5934\u6587\u4ef6\u548c\u9759\u6001\u5e93\u6587\u4ef6\u5b89\u88c5\u81f3\u7cfb\u7edf\u76ee\u5f55\u4e2d<\/p>\n<p>\u9664\u4e86\u8fd9\u79cd\u6bd4\u8f83\u9ebb\u70e6\u7684\u6307\u5b9a\u8def\u5f84\u7f16\u8bd1\u5916&#xff0c;\u6211\u4eec\u8fd8\u53ef\u4ee5\u5c06\u5934\u6587\u4ef6\u4e0e\u9759\u6001\u5e93\u6587\u4ef6\u76f4\u63a5\u5b89\u88c5\u5728\u7cfb\u7edf\u76ee\u5f55\u4e2d&#xff0c;\u76f4\u63a5\u4f7f\u7528&#xff0c;\u65e0\u9700\u6307\u5b9a\u8def\u5f84&#xff08;\u9700\u8981\u6307\u5b9a\u9759\u6001\u5e93\u540d&#xff09;<\/p>\n<p>\u6240\u8c13\u7684\u5b89\u88c5\u8f6f\u4ef6&#xff0c;\u5c31\u662f\u5c06\u81ea\u5df1\u7684\u6587\u4ef6\u5b89\u88c5\u5230\u7cfb\u7edf\u76ee\u5f55\u4e0b<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> .\/*.h \/usr\/include\/<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> libmycalc.a \/usr\/lib\/x86_64-linux-gnu<\/p>\n<p><img decoding=\"async\" src=\"2025-06-05yihc4dklkfw.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6ce8\u610f&#xff1a; \u5c06\u81ea\u5df1\u5199\u7684\u6587\u4ef6\u5b89\u88c5\u5230\u7cfb\u7edf\u76ee\u5f55\u4e0b\u662f\u4e00\u4ef6\u5371\u9669\u7684\u4e8b&#xff08;\u5bfc\u81f4\u7cfb\u7edf\u73af\u5883\u88ab\u6c61\u67d3&#xff09;&#xff0c;\u7528\u5b8c\u540e\u8bb0\u5f97\u624b\u52a8\u5220\u9664<\/p>\n<p><img decoding=\"async\" src=\"2025-06-050f0cui3nch5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>4\u3001\u5236\u4f5c\u52a8\u6001\u5e93<\/h2>\n<p>\u9664\u4e86\u53ef\u4ee5\u5236\u4f5c\u9759\u6001\u5e93\u5916&#xff0c;\u6211\u4eec\u8fd8\u53ef\u4ee5\u5236\u4f5c\u52a8\u6001\u5e93&#xff0c;\u8fd9\u91cc\u7528\u7684\u4f8b\u5b50\u548c\u4e0a\u9762\u4e00\u6837<\/p>\n<h3>4.1\u3001\u52a8\u6001\u5e93\u7684\u6253\u5305<\/h3>\n<p>\u52a8\u6001\u5e93\u4e0d\u540c\u4e8e\u9759\u6001\u5e93&#xff0c;\u52a8\u6001\u5e93\u4e2d\u7684\u51fd\u6570\u4ee3\u7801\u4e0d\u9700\u8981\u52a0\u8f7d\u5230\u6e90\u6587\u4ef6\u4e2d&#xff0c;\u800c\u662f\u901a\u8fc7 \u4e0e\u4f4d\u7f6e\u65e0\u5173\u7801 &#xff0c;\u5bf9\u6307\u5b9a\u51fd\u6570\u8fdb\u884c\u94fe\u63a5\u4f7f\u7528<\/p>\n<p>\u52a8\u6001\u5e93\u7684\u6253\u5305\u4e5f\u540c\u6837\u5206\u4e3a\u4e24\u6b65&#xff1a;<\/p>\n<ul>\n<li>\u7f16\u8bd1\u6e90\u6587\u4ef6&#xff0c;\u751f\u6210\u4e8c\u8fdb\u5236\u53ef\u94fe\u63a5\u6587\u4ef6&#xff0c;\u6b64\u65f6\u9700\u8981\u52a0\u4e0a -fPIC \u4e0e\u4f4d\u7f6e\u65e0\u5173\u7801<\/li>\n<li>\u901a\u8fc7 gcc\/g&#043;&#043; \u76f4\u63a5\u76ee\u6807\u7a0b\u5e8f&#xff08;\u6b64\u65f6\u4e0d\u9700\u8981\u4f7f\u7528 ar \u5f52\u6863\u5de5\u5177&#xff09;<\/li>\n<\/ul>\n<p>\u5c06\u6e90\u6587\u4ef6\u7f16\u8bd1\u4e3a.o\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff0c;\u6b64\u65f6\u9700\u8981\u5e26\u4e0a fPIC \u4e0e\u4f4d\u7f6e\u65e0\u5173\u7801<\/p>\n<p>gcc <span class=\"token parameter variable\">-c<\/span> <span class=\"token parameter variable\">-fPIC<\/span> *.c<\/p>\n<p><img decoding=\"async\" src=\"2025-06-05abt5hiapwvy.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5c06\u6240\u6709\u7684 .o \u6587\u4ef6\u6253\u5305\u4e3a\u52a8\u6001\u5e93&#xff08;\u501f\u52a9 gcc\/g&#043;&#043;&#xff09;<\/p>\n<p>gcc <span class=\"token parameter variable\">-o<\/span> libmycalc.so *.o <span class=\"token parameter variable\">-shared<\/span><\/p>\n<p><img decoding=\"async\" src=\"2025-06-05quqvd5rgirh.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u83b7\u5f97\u52a8\u6001\u5e93\u540e&#xff0c;\u5c31\u53ef\u4ee5\u8fdb\u884c\u4f7f\u7528\u4e86<\/p>\n<p>\u6ce8&#xff1a;\u6b64\u65f6\u7684 .h\u3001.c\u3001.o \u6587\u4ef6\u4f4d\u4e8e myinclude \u6587\u4ef6\u5939\u4e2d&#xff0c;\u800c\u52a8\u6001\u5e93\u6587\u4ef6 .so \u4f4d\u4e8e libmycalc.so \u6587\u4ef6\u5939\u4e2d<\/p>\n<p>4.2\u3001\u52a8\u6001\u5e93\u7684\u94fe\u63a5\u4e0e\u4f7f\u7528 \u50cf\u4f7f\u7528\u9759\u6001\u5e93\u4e00\u6837\u4f7f\u7528\u52a8\u6001\u5e93&#xff08;\u6307\u5b9a\u8def\u5f84\u53ca\u5e93\u540d&#xff09;&#xff0c;\u7f16\u8bd1\u6210\u529f&#xff0c;\u4f46\u8fd0\u884c\u5931\u8d25&#xff01;<\/p>\n<p><img decoding=\"async\" src=\"2025-06-05cupsjypltgc.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8fd9\u79cd\u95ee\u9898&#xff1f;\u56e0\u4e3a\u5f53\u524d\u53ea\u544a\u8bc9\u4e86\u7f16\u8bd1\u5668\u52a8\u6001\u5e93\u7684\u4f4d\u7f6e&#xff0c;\u6ca1\u6709\u544a\u8bc9 OS<\/p>\n<p>\u901a\u8fc7ldd\u67e5\u770b\u7a0b\u5e8f\u94fe\u63a5\u60c5\u51b5&#xff1a; <img decoding=\"async\" src=\"2025-06-05zgu1acjticn.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5f53\u524d\u5c1a\u672a\u94fe\u63a5<\/p>\n<p>\u8fd0\u884c\u65f6&#xff0c;OS \u00b7\u662f\u5982\u4f55\u94fe\u63a5\u00b7\u52a8\u6001\u5e93&#xff1f;<\/p>\n<li>\u73af\u5883\u53d8\u91cf\u00b7LD_LIBRARY_PATH &#xff08;\u9ed8\u8ba4\u6ca1\u6709\u8fd9\u4e2a\u73af\u5883\u53d8\u91cf&#xff09;&#xff0c;\u5c06\u7b2c\u4e09\u65b9\u52a8\u6001\u5e93\u8def\u5f84\u6dfb\u52a0\u81f3\u6b64\u73af\u5883\u53d8\u91cf\u4e2d&#xff08;\u4e34\u65f6\u65b9\u6848&#xff09;<\/li>\n<li>sudo \u5728 \/lib64\/ \u76ee\u5f55\u4e0b\u5efa\u7acb\u52a8\u6001\u5e93\u7684\u8f6f\u94fe\u63a5<\/li>\n<li>\u66f4\u6539\u914d\u7f6e\u6587\u4ef6\/etc\/ld.so.conf.d\u8fd9\u4e2a\u76ee\u5f55\u4e2d\u90fd\u662f\u5404\u79cd\u52a8\u6001\u5e93\u914d\u7f6e\u6587\u4ef6&#xff0c;\u521b\u5efa\u6587\u4ef6 xx.conf \u81f3\u76ee\u5f55\u4e2d&#xff08;\u6587\u4ef6\u4e2d\u5b58\u50a8\u7684\u662f\u7b2c\u4e09\u65b9\u52a8\u6001\u5e93\u7684\u8def\u5f84&#xff09;ldconfig \u4ee4\u914d\u7f6e\u6587\u4ef6\u751f\u6548<\/li>\n<p>\u4ee5\u4e0a\u4e09\u79cd\u65b9\u5f0f\u90fd\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\u52a8\u6001\u5e93&#xff0c;\u4e0b\u9762\u5c31\u6765\u9010\u4e2a\u8fdb\u884c\u5c1d\u8bd5<\/p>\n<p>\u65b9\u6cd5\u4e00&#xff1a;\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u89e3\u51b3<\/p>\n<p>\u6dfb\u52a0\u52a8\u6001\u5e93\u8def\u5f84\u81f3 LD_LIBRARY_PATH \u73af\u5883\u53d8\u91cf\u4e2d<\/p>\n<p><img decoding=\"async\" src=\"2025-06-05vghup1pfbsp.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u73af\u5883\u53d8\u91cf LD_LIBRARY_PATH \u662f\u7a0b\u5e8f\u5728\u8fdb\u884c\u52a8\u6001\u5e93\u67e5\u627e\u65f6\u7684\u9ed8\u8ba4\u641c\u7d22\u8def\u5f84<\/p>\n<p>\u6ce8\u610f&#xff1a; \u66f4\u6539\u73af\u5883\u53d8\u91cf\u53ea\u662f\u4e34\u65f6\u65b9\u6848&#xff0c;\u91cd\u65b0\u767b\u5f55\u540e\u4f1a\u5931\u6548<\/p>\n<p>\u65b9\u6cd5\u4e8c&#xff1a;\u5c06\u52a8\u6001\u5e93\u7684\u8f6f\u94fe\u63a5\u6587\u4ef6\u5b58\u5165\u7cfb\u7edf\u76ee\u5f55\u4e2d<\/p>\n<p> <span class=\"token function\">sudo<\/span> <span class=\"token function\">ln<\/span> <span class=\"token parameter variable\">-s<\/span> \/home\/ccc\/lesson20\/myinclude\/libmycalc.so \/lib64\/<\/p>\n<p><img decoding=\"async\" src=\"2025-06-05j5veerq20nd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6ce8\u610f&#xff1a; \u521b\u5efa\u8f6f\u8fde\u63a5\u6587\u4ef6\u65f6&#xff0c;\u9700\u8981\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84&#xff01;<\/p>\n<p>\u65b9\u6cd5\u4e09&#xff1a;\u66f4\u6539\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u4fe1\u606f<\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> \/home\/ccc\/lesson20\/myinclude\/libmycalc.so <span class=\"token operator\">&gt;<\/span> ccc.conf<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mv<\/span> ccc.conf \/etc\/ld.so.conf.d\/<br \/>\n<span class=\"token function\">ls<\/span> \/etc\/ld.so.conf.d\/ccc.conf<\/p>\n<p><img decoding=\"async\" src=\"2025-06-05d4pfkhn2iq0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6ce8\u610f&#xff1a; \u540e\u4e24\u79cd\u65b9\u6cd5\u90fd\u53ef\u4ee5\u505a\u5230\u6c38\u4e45\u751f\u6548&#xff08;\u56e0\u4e3a\u5b58\u5165\u4e86\u7cfb\u7edf\u76ee\u5f55\u4e2d&#xff09;&#xff0c;\u4f46\u5728\u4f7f\u7528\u5b8c\u540e\u6700\u597d\u5220\u9664&#xff0c;\u907f\u514d\u6c61\u67d3\u7cfb\u7edf\u73af\u5883<\/p>\n<h3>4.3\u3001\u52a8\u6001\u5e93\u7684\u94fe\u63a5\u539f\u7406<\/h3>\n<p>\u7a0b\u5e8f\u5728\u94fe\u63a5\u52a8\u6001\u5e93\u51fd\u6570\u65f6&#xff0c;\u662f\u901a\u8fc7 \u52a8\u6001\u5e93\u8d77\u59cb\u5730\u5740 &#043; \u6240\u94fe\u63a5\u51fd\u6570\u504f\u79fb\u91cf \u7684\u65b9\u5f0f\u8fdb\u884c\u94fe\u63a5\u8bbf\u95ee\u7684&#xff0c;\u800c\u8fd9\u4e2a\u504f\u79fb\u91cf\u5c31\u662f fPIC \u4e0e\u4f4d\u7f6e\u65e0\u5173\u7801<\/p>\n<p>\u5730\u5740\u5176\u5b9e\u5c31\u4e24\u79cd&#xff1a;\u7edd\u5bf9\u5730\u5740\u548c\u76f8\u5bf9\u5730\u5740.<\/p>\n<ul>\n<li>\u9759\u6001\u94fe\u63a5\u65f6&#xff0c;\u5c06\u53ef\u94fe\u63a5\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u52a0\u8f7d\u81f3\u7a0b\u5e8f\u4e2d&#xff0c;\u76f4\u63a5\u901a\u8fc7 \u7edd\u5bf9\u5730\u5740 \u8fdb\u884c\u94fe\u63a5&#xff0c;\u5047\u8bbe\u51fd\u6570\u88ab\u8c03\u7528\u4e86\u591a\u6b21&#xff0c;\u5c31\u4f1a\u5bfc\u81f4\u4ee3\u7801\u5197\u4f59\u7b49\u95ee\u9898&#xff1b;<\/li>\n<li>\u52a8\u6001\u94fe\u63a5\u91c7\u7528 \u76f8\u5bf9\u5730\u5740 \u7684\u65b9\u5f0f\u8fdb\u884c\u94fe\u63a5&#xff0c;\u540c\u4e00\u4e2a\u51fd\u6570\u7684 \u52a8\u6001\u5e93\u8d77\u59cb\u5730\u5740 &#043; \u6240\u94fe\u63a5\u51fd\u6570\u504f\u79fb\u91cf \u503c\u76f8\u540c&#xff0c;\u4ee3\u7801\u53ea\u9700\u8981\u52a0\u8f7d\u4e00\u4efd&#xff0c;\u5e76\u4e14\u53ef\u4ee5\u4efb\u610f\u4f4d\u7f6e\u8fdb\u884c\u51fd\u6570\u8c03\u7528&#xff08;\u4e0e\u4f4d\u7f6e\u65e0\u5173&#xff09;<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"2025-06-05t11lrx33cdx.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u52a8\u6001\u5e93\u4e2d\u6240\u6709\u5730\u5740\u90fd\u662f\u504f\u79fb\u91cf&#xff0c;\u9ed8\u8ba4\u4ece 0 \u5f00\u59cb<\/p>\n<p>\u53ea\u6709\u5f53\u4e00\u4e2a\u5e93\u88ab\u771f\u6b63\u6620\u5c04\u8fdb\u5730\u5740\u7a7a\u95f4\u540e&#xff0c;\u5b83\u7684\u8d77\u59cb\u5730\u5740\u624d\u80fd\u771f\u6b63\u786e\u5b9a<\/p>\n<ul>\n<li>\u94fe\u63a5\u5e93\u4e2d\u7684\u51fd\u6570\u65f6&#xff0c;\u901a\u8fc7 \u52a8\u6001\u5e93\u7684\u8d77\u59cb\u5730\u5740 &#043; \u51fd\u6570\u504f\u79fb\u91cf \u7684\u65b9\u5f0f\u94fe\u63a5\u51fd\u6570<\/li>\n<li>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u8bba\u5728\u4ec0\u4e48\u4f4d\u7f6e&#xff0c;\u90fd\u53ef\u4ee5\u968f\u4fbf\u94fe\u63a5\u51fd\u6570&#xff08;\u4e0e\u4f4d\u7f6e\u65e0\u5173&#xff09;<\/li>\n<li>\u4e0e\u4f4d\u7f6e\u65e0\u5173\u7801&#xff1a;\u52a8\u6001\u5e93\u4e2d\u5730\u5740&#xff0c;\u662f\u504f\u79fb\u91cf<\/li>\n<\/ul>\n<h2>5\u3001\u52a8\u6001\u5e93\u77e5\u8bc6\u8865\u5145<\/h2>\n<ul>\n<li>\n<p>\u5f53\u540c\u65f6\u62e5\u6709 \u9759\u6001\u5e93 \u548c \u52a8\u6001\u5e93 \u65f6&#xff0c;\u9ed8\u8ba4\u91c7\u7528\u52a8\u6001\u94fe\u63a5<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u53ea\u6709\u9759\u6001\u5e93&#xff0c;\u4f46\u53c8\u4e0d\u6307\u5b9a\u9759\u6001\u94fe\u63a5&#xff0c;\u4f1a\u53d1\u751f\u9759\u6001\u5e93\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>\u9759\u6001\u94fe\u63a5\u751f\u6210\u7684\u7a0b\u5e8f\u6bd4\u52a8\u6001\u94fe\u63a5\u5927\u5f97\u591a&#xff0c;\u5e76\u4e14\u5185\u542b\u9759\u6001\u5e93\u7684\u52a8\u6001\u94fe\u63a5\u7a0b\u5e8f&#xff0c;\u4e5f\u6bd4\u7eaf\u7cb9\u7684\u52a8\u6001\u94fe\u63a5\u7a0b\u5e8f\u5927&#xff0c;\u8bf4\u660e\u7a0b\u5e8f\u4e0d\u662f\u00b7\u975e\u9759\u5373\u52a8&#xff0c;\u53ef\u4ee5\u540c\u65f6\u4f7f\u7528\u52a8\u6001\u5e93\u4e0e\u9759\u6001\u5e93<\/p>\n<\/li>\n<\/ul>\n<p>\u672c\u7bc7\u5173\u4e8e\u8f6f\u786c\u94fe\u63a5\u4e0e\u52a8\u9759\u6001\u5e93\u7684\u4ecb\u7ecd\u5c31\u6682\u544a\u6bb5\u843d\u5566&#xff0c;\u5e0c\u671b\u80fd\u5bf9\u5927\u5bb6\u7684\u5b66\u4e60\u4ea7\u751f\u5e2e\u52a9&#xff0c;\u6b22\u8fce\u5404\u4f4d\u4f6c\u524d\u6765\u652f\u6301\u65a7\u6b63&#xff01;&#xff01;&#xff01;<\/p>\n<p><img decoding=\"async\" src=\"2025-06-05hnrwvlgpw5g.gif\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb935\u6b21\uff0c\u70b9\u8d5e68\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u8ba1\u7b97\u673a\u7684\u65e0\u5f62\u4e16\u754c\u4e2d\uff0c\u6570\u636e\u5982\u6cb3\u6d41\u822c\u6d41\u6dcc\uff0c\u800c\u6587\u4ef6\u7cfb\u7edf\u5219\u662f\u6cb3\u9053\u7684\u8bbe\u8ba1\u8005\u3002Linux\uff0c\u8fd9\u4f4d\u53e4\u8001\u800c\u777f\u667a\u7684\u5b88\u62a4\u8005\uff0c\u4e3a\u6211\u4eec\u94fa\u8bbe\u4e86\u4e00\u6761\u901a\u5f80\u6570\u5b57\u738b\u56fd\u6df1\u5904\u7684\u9053\u8def\u3002\u4eca\u5929\uff0c\u8ba9\u6211\u4eec\u8e0f\u4e0a\u4e00\u6bb5\u5947\u5999\u7684\u65c5\u7a0b\uff0c\u63a2\u7d22Linux\u57fa\u7840I\/O\u4e2d\u90a3\u4e9b\u770b\u4f3c\u5e73\u51e1\u5374\u8574\u542b\u65e0\u9650\u667a\u6167\u7684\u94fe\u63a5\u4e0e\u5e93\u3002<\/p>\n","protected":false},"author":2,"featured_media":41817,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[84,58,1657,43],"topic":[],"class_list":{"0":"post-41837","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-android","9":"tag-linux","11":"tag-43"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93 - \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\/41837.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb935\u6b21\uff0c\u70b9\u8d5e68\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u8ba1\u7b97\u673a\u7684\u65e0\u5f62\u4e16\u754c\u4e2d\uff0c\u6570\u636e\u5982\u6cb3\u6d41\u822c\u6d41\u6dcc\uff0c\u800c\u6587\u4ef6\u7cfb\u7edf\u5219\u662f\u6cb3\u9053\u7684\u8bbe\u8ba1\u8005\u3002Linux\uff0c\u8fd9\u4f4d\u53e4\u8001\u800c\u777f\u667a\u7684\u5b88\u62a4\u8005\uff0c\u4e3a\u6211\u4eec\u94fa\u8bbe\u4e86\u4e00\u6761\u901a\u5f80\u6570\u5b57\u738b\u56fd\u6df1\u5904\u7684\u9053\u8def\u3002\u4eca\u5929\uff0c\u8ba9\u6211\u4eec\u8e0f\u4e0a\u4e00\u6bb5\u5947\u5999\u7684\u65c5\u7a0b\uff0c\u63a2\u7d22Linux\u57fa\u7840I\/O\u4e2d\u90a3\u4e9b\u770b\u4f3c\u5e73\u51e1\u5374\u8574\u542b\u65e0\u9650\u667a\u6167\u7684\u94fe\u63a5\u4e0e\u5e93\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/41837.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-04T23:16:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b10d464.gif\" \/>\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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41837.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/41837.html\",\"name\":\"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-04T23:16:04+00:00\",\"dateModified\":\"2025-06-04T23:16:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/41837.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/41837.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41837.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93\"}]},{\"@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":"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93 - \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\/41837.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb935\u6b21\uff0c\u70b9\u8d5e68\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u8ba1\u7b97\u673a\u7684\u65e0\u5f62\u4e16\u754c\u4e2d\uff0c\u6570\u636e\u5982\u6cb3\u6d41\u822c\u6d41\u6dcc\uff0c\u800c\u6587\u4ef6\u7cfb\u7edf\u5219\u662f\u6cb3\u9053\u7684\u8bbe\u8ba1\u8005\u3002Linux\uff0c\u8fd9\u4f4d\u53e4\u8001\u800c\u777f\u667a\u7684\u5b88\u62a4\u8005\uff0c\u4e3a\u6211\u4eec\u94fa\u8bbe\u4e86\u4e00\u6761\u901a\u5f80\u6570\u5b57\u738b\u56fd\u6df1\u5904\u7684\u9053\u8def\u3002\u4eca\u5929\uff0c\u8ba9\u6211\u4eec\u8e0f\u4e0a\u4e00\u6bb5\u5947\u5999\u7684\u65c5\u7a0b\uff0c\u63a2\u7d22Linux\u57fa\u7840I\/O\u4e2d\u90a3\u4e9b\u770b\u4f3c\u5e73\u51e1\u5374\u8574\u542b\u65e0\u9650\u667a\u6167\u7684\u94fe\u63a5\u4e0e\u5e93\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/41837.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-04T23:16:04+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250604231601-6840d3b10d464.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/41837.html","url":"https:\/\/www.wsisp.com\/helps\/41837.html","name":"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-04T23:16:04+00:00","dateModified":"2025-06-04T23:16:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/41837.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/41837.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/41837.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7a7f\u8d8a\u6587\u4ef6\u4e4b\u6d77\uff1aLinux\u94fe\u63a5\u4e0e\u5e93\u7684\u5947\u5e7b\u65c5\u7a0b\uff0c\u8f6f\u786c\u8fde\u63a5\u4e0e\u52a8\u9759\u6001\u5e93"}]},{"@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\/41837","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=41837"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/41837\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/41817"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=41837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=41837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=41837"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=41837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}