{"id":275,"date":"2022-07-04T10:18:48","date_gmt":"2022-07-04T02:18:48","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=275"},"modified":"2022-07-04T21:28:37","modified_gmt":"2022-07-04T13:28:37","slug":"chapter-06","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/chapter-06.html","title":{"rendered":"\u7b2c6\u7ae0 \u5b58\u50a8\u7ed3\u6784\u4e0e\u78c1\u76d8\u5212\u5206\u3002"},"content":{"rendered":"
👇\u672c\u7ae0\u8282\u5185\u5bb9\u5df2\u66f4\u65b0\uff0c\u8bf7\u5728\u7ebf\u9605\u8bfb\u6700\u65b0RHEL 8\u7248\u672c\u4e66\u7c4d 👇<\/span><\/strong><\/span><\/p>\n https:\/\/lrxjmw.cn\/basic-learning-06.html<\/span><\/strong><\/span><\/b><\/p>\n \u7ae0\u8282\u7b80\u8ff0\uff1a<\/strong><\/span><\/p>\n Linux\u7cfb\u7edf\u4e2d\u9887\u5177\u7279\u8272\u7684\u6587\u4ef6\u5b58\u50a8\u7ed3\u6784\u5e38\u5e38\u641e\u5f97\u65b0\u624b\u5934\u6655\u8111\u80c0\uff0c\u672c\u7ae0\u5c06\u4eceLinux\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u5b58\u50a8\u7ed3\u6784\u5f00\u59cb\uff0c\u8bb2\u8ff0\u6587\u4ef6\u7cfb\u7edf\u5c42\u6b21\u5316\u6807\u51c6\uff08FHS\uff0cFilesystem Hierarchy Standard\uff09\u3001udev\u786c\u4ef6\u547d\u540d\u89c4\u5219\u4ee5\u53ca\u786c\u76d8\u5206\u533a\u7684\u89c4\u5212\u65b9\u6cd5\u3002<\/p>\n \u4e3a\u4e86\u8ba9\u8bfb\u8005\u66f4\u597d\u5730\u7406\u89e3\u6587\u4ef6\u7cfb\u7edf\u7684\u4f5c\u7528\uff0c\u5218\u9044\u8001\u5e08\u5c06\u5728\u672c\u7ae0\u4e2d\u8be6\u7ec6\u5730\u5206\u6790Linux\u7cfb\u7edf\u4e2d\u6700\u5e38\u89c1\u7684Ext3\u3001Ext4\u4e0eXFS\u6587\u4ef6\u7cfb\u7edf\u7684\u4e0d\u540c\u4e4b\u5904\uff0c\u5e76\u5e26\u9886\u5404\u4f4d\u8bfb\u8005\u7740\u91cd\u7ec3\u4e60\u786c\u76d8\u8bbe\u5907\u5206\u533a\u3001\u683c\u5f0f\u5316\u4ee5\u53ca\u6302\u8f7d\u7b49\u5e38\u7528\u7684\u786c\u76d8\u7ba1\u7406\u64cd\u4f5c\uff0c\u4ee5\u4fbf\u719f\u7ec3\u638c\u63e1\u6587\u4ef6\u7cfb\u7edf\u7684\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n \u5728\u6253\u4e0b\u575a\u5b9e\u7684\u7406\u8bba\u57fa\u7840\u4e0e\u5b8c\u6210\u4e00\u4e9b\u76f8\u5173\u7684\u5b9e\u8df5\u7ec3\u4e60\u540e\uff0c\u6211\u4eec\u5c06\u8fdb\u4e00\u6b65\u5b8c\u6574\u5730\u90e8\u7f72SWAP\u4ea4\u6362\u5206\u533a\u3001\u914d\u7f6equota\u78c1\u76d8\u914d\u989d\u670d\u52a1\uff0c\u4ee5\u53ca\u638c\u63e1ln\u547d\u4ee4\u5e26\u6765\u7684\u8f6f\u786c\u94fe\u63a5\u3002\u76f8\u4fe1\u5404\u4f4d\u8bfb\u8005\u5728\u5b66\u4e60\u5b8c\u672c\u7ae0\u540e\uff0c\u4f1a\u5bf9Linux\u7cfb\u7edf\u4ee5\u53caWindows\u7cfb\u7edf\u4e2d\u7684\u78c1\u76d8\u5b58\u50a8\u4ee5\u53ca\u6587\u4ef6\u7cfb\u7edf\u6709\u6df1\u5165\u7684\u7406\u89e3\u3002<\/p>\n \u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u76ee\u5f55\u3001\u5b57\u7b26\u8bbe\u5907\u3001\u5757\u8bbe\u5907\u3001\u5957\u63a5\u5b57\u3001\u6253\u5370\u673a\u7b49\u90fd\u88ab\u62bd\u8c61\u6210\u4e86\u6587\u4ef6\uff0c\u5373\u5218\u9044\u8001\u5e08\u6240\u4e00\u76f4\u5f3a\u8c03\u7684\u201cLinux\u7cfb\u7edf\u4e2d\u4e00\u5207\u90fd\u662f\u6587\u4ef6\u201d\u3002\u65e2\u7136\u5e73\u65f6\u6211\u4eec\u6253\u4ea4\u9053\u7684\u90fd\u662f\u6587\u4ef6\uff0c\u90a3\u4e48\u53c8\u5e94\u8be5\u5982\u4f55\u627e\u5230\u5b83\u4eec\u5462\uff1f\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u60f3\u8981\u627e\u5230\u4e00\u4e2a\u6587\u4ef6\uff0c\u6211\u4eec\u8981\u4f9d\u6b21\u8fdb\u5165\u8be5\u6587\u4ef6\u6240\u5728\u7684\u78c1\u76d8\u5206\u533a\uff08\u5047\u8bbe\u8fd9\u91cc\u662fD\u76d8\uff09\uff0c\u7136\u540e\u5728\u8fdb\u5165\u8be5\u5206\u533a\u4e0b\u7684\u5177\u4f53\u76ee\u5f55\uff0c\u6700\u7ec8\u627e\u5230\u8fd9\u4e2a\u6587\u4ef6\u3002\u4f46\u662f\u5728Linux\u7cfb\u7edf\u4e2d\u5e76\u4e0d\u5b58\u5728C\/D\/E\/F\u7b49\u76d8\u7b26\uff0cLinux\u7cfb\u7edf\u4e2d\u7684\u4e00\u5207\u6587\u4ef6\u90fd\u662f\u4ece\u201c\u6839\uff08\/\uff09\u201d\u76ee\u5f55\u5f00\u59cb\u7684\uff0c\u5e76\u6309\u7167\u6587\u4ef6\u7cfb\u7edf\u5c42\u6b21\u5316\u6807\u51c6\uff08FHS\uff09\u91c7\u7528\u6811\u5f62\u7ed3\u6784\u6765\u5b58\u653e\u6587\u4ef6\uff0c\u4ee5\u53ca\u5b9a\u4e49\u4e86\u5e38\u89c1\u76ee\u5f55\u7684\u7528\u9014\u3002\u53e6\u5916\uff0cLinux\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u540d\u79f0\u662f\u4e25\u683c\u533a\u5206\u5927\u5c0f\u5199\u7684\u3002\u4f8b\u5982\uff0croot\u3001rOOt\u3001Root\u3001rooT\u5747\u4ee3\u8868\u4e0d\u540c\u7684\u76ee\u5f55\uff0c\u5e76\u4e14\u6587\u4ef6\u540d\u79f0\u4e2d\u4e0d\u5f97\u5305\u542b\u659c\u6760\uff08\/\uff09\u3002Linux\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u5b58\u50a8\u7ed3\u6784\u5982\u56fe6-1\u6240\u793a\u3002<\/p>\n <\/p>\n \u56fe6-1\u00a0 Linux\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u5b58\u50a8\u7ed3\u6784<\/p>\n \u524d\u6587\u63d0\u5230\u7684FHS\u662f\u6839\u636e\u4ee5\u5f80\u65e0\u6570Linux\u7cfb\u7edf\u7528\u6237\u548c\u5f00\u53d1\u8005\u7684\u7ecf\u9a8c\u800c\u603b\u7ed3\u51fa\u6765\u7684\uff0c\u662f\u7528\u6237\u5728Linux\u7cfb\u7edf\u4e2d\u5b58\u50a8\u6587\u4ef6\u65f6\u9700\u8981\u9075\u5b88\u7684\u89c4\u5219\uff0c\u7528\u4e8e\u6307\u5bfc\u6211\u4eec\u5e94\u8be5\u628a\u6587\u4ef6\u4fdd\u5b58\u5230\u4ec0\u4e48\u4f4d\u7f6e\uff0c\u4ee5\u53ca\u544a\u8bc9\u7528\u6237\u5e94\u8be5\u5728\u4f55\u5904\u627e\u5230\u6240\u9700\u7684\u6587\u4ef6\u3002\u4f46\u662f\uff0cFHS\u5bf9\u4e8e\u7528\u6237\u6765\u8bb2\u53ea\u80fd\u7b97\u662f\u4e00\u79cd\u9053\u5fb7\u4e0a\u7684\u7ea6\u675f\uff0c\u6709\u4e9b\u7528\u6237\u5c31\u662f\u61d2\u5f97\u9075\u5b88\uff0c\u4f9d\u7136\u4f1a\u628a\u6587\u4ef6\u5230\u5904\u4e71\u653e\uff0c\u6709\u4e9b\u751a\u81f3\u4ece\u6765\u6ca1\u6709\u542c\u8bf4\u8fc7\u5b83\u3002\u8fd9\u91cc\u5e76\u4e0d\u662f\u53f7\u53ec\u5404\u4f4d\u8bfb\u8005\u53bb\u8c34\u8d23\u4ed6\u4eec\uff0c\u800c\u662f\u5efa\u8bae\u5927\u5bb6\u8981\u7075\u6d3b\u8fd0\u7528\u6240\u5b66\u7684\u77e5\u8bc6\uff0c\u5343\u4e07\u4e0d\u8981\u8ba4\u51c6\u8fd9\u4e2aFHS\u534f\u5b9a\u53ea\u8bb2\u6b7b\u9053\u7406\uff0c\u4e0d\u7136\u5403\u4e8f\u7684\u53ef\u5c31\u662f\u81ea\u5df1\u4e86\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u6700\u5e38\u89c1\u7684\u76ee\u5f55\u4ee5\u53ca\u6240\u5bf9\u5e94\u7684\u5b58\u653e\u5185\u5bb9\u5982\u88686-1\u6240\u793a\u3002<\/p>\n \u88686-1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Linux\u7cfb\u7edf\u4e2d\u5e38\u89c1\u7684\u76ee\u5f55\u540d\u79f0\u4ee5\u53ca\u76f8\u5e94\u5185\u5bb9<\/p>\n <\/p>\n \u5728Linux\u7cfb\u7edf\u4e2d\u53e6\u5916\u8fd8\u6709\u4e00\u4e2a\u91cd\u8981\u7684\u6982\u5ff5\u2014\u8def\u5f84\u3002\u8def\u5f84\u6307\u7684\u662f\u5982\u4f55\u5b9a\u4f4d\u5230\u67d0\u4e2a\u6587\u4ef6\uff0c\u5206\u4e3a\u7edd\u5bf9\u8def\u5f84\u4e0e\u76f8\u5bf9\u8def\u5f84\u3002\u7edd\u5bf9\u8def\u5f84\u6307\u7684\u662f\u4ece\u6839\u76ee\u5f55\uff08\/\uff09\u5f00\u59cb\u5199\u8d77\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u540d\u79f0\uff0c\u800c\u76f8\u5bf9\u8def\u5f84\u5219\u6307\u7684\u662f\u76f8\u5bf9\u4e8e\u5f53\u524d\u8def\u5f84\u7684\u5199\u6cd5\u3002\u6211\u4eec\u6765\u770b\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50\uff0c\u4ee5\u5e2e\u52a9\u5927\u5bb6\u7406\u89e3\u3002\u5047\u5982\u6709\u4f4d\u5916\u56fd\u6e38\u5ba2\u6765\u5230\u4e2d\u56fd\u6f58\u5bb6\u56ed\u65c5\u6e38\uff0c\u5f53\u524d\u5185\u6025\u4f46\u662f\u627e\u4e0d\u5230\u6d17\u624b\u95f4\uff0c\u7279\u610f\u5411\u60a8\u95ee\u8def\uff0c\u90a3\u4e48\u60a8\u6709\u4e24\u79cd\u6b63\u786e\u7684\u6307\u8def\u65b9\u6cd5\u3002<\/p>\n \u7edd\u5bf9\u8def\u5f84\uff08absolute path\uff09:<\/strong>\u9996\u5148\u5750\u98de\u673a\u6765\u5230\u4e2d\u56fd\uff0c\u5230\u4e86\u5317\u4eac\u51fa\u9996\u90fd\u673a\u573a\u5750\u673a\u573a\u5feb\u8f68\u5230\u4e09\u5143\u6865\uff0c\u7136\u540e\u6362\u4e5810\u53f7\u7ebf\u5230\u6f58\u5bb6\u56ed\u7ad9\uff0c\u51fa\u7ad9\u540e\u575034\u8def\u516c\u4ea4\u8f66\u5230\u519c\u5149\u91cc\uff0c\u4e0b\u8f66\u540e\u8def\u53e3\u5de6\u8f6c\u3002<\/p>\n \u76f8\u5bf9\u8def\u5f84\uff08relative path\uff09:<\/strong>\u524d\u9762\u8def\u53e3\u5de6\u8f6c\u3002<\/p><\/blockquote>\n \u8fd9\u4e24\u79cd\u65b9\u6cd5\u90fd\u6b63\u786e\u3002\u5982\u679c\u60a8\u8bf4\u7684\u662f\u7edd\u5bf9\u8def\u5f84\uff0c\u90a3\u4e48\u4efb\u4f55\u4e00\u4f4d\u5916\u56fd\u6e38\u5ba2\u90fd\u53ef\u4ee5\u6309\u7167\u8fd9\u4e2a\u63d0\u793a\u627e\u5230\u6f58\u5bb6\u56ed\u7684\u6d17\u624b\u95f4\uff0c\u4f46\u662f\u592a\u7e41\u7410\u4e86\u3002\u5982\u679c\u60a8\u8bf4\u7684\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u867d\u7136\u8868\u8fbe\u5f88\u7b80\u7ec3\uff0c\u4f46\u662f\u8fd9\u4f4d\u5916\u56fd\u6e38\u5ba2\u53ea\u80fd\u4ece\u5f53\u524d\u4f4d\u7f6e\uff08\u4e0d\u89c1\u5f97\u662f\u6f58\u5bb6\u56ed\uff09\u51fa\u53d1\u627e\u5230\u6d17\u624b\u95f4\uff0c\u56e0\u6b64\u5e76\u4e0d\u80fd\u4fdd\u8bc1\u5728\u524d\u9762\u7684\u8def\u53e3\u5de6\u8f6c\u540e\u53ef\u4ee5\u627e\u5230\u6d17\u624b\u95f4\uff0c\u7531\u6b64\u53ef\u89c1\uff0c\u76f8\u5bf9\u8def\u5f84\u4e0d\u5177\u5907\u666e\u9002\u6027\u3002<\/p>\n \u5982\u679c\u5404\u4f4d\u8bfb\u8005\u73b0\u5728\u8fd8\u662f\u4e0d\u80fd\u7406\u89e3\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u7684\u533a\u522b\uff0c\u4e5f\u4e0d\u8981\u7740\u6025\uff0c\u4ee5\u540e\u901a\u8fc7\u5b9e\u8df5\u7ec3\u4e60\u80af\u5b9a\u53ef\u4ee5\u5f7b\u5e95\u641e\u660e\u767d\u3002\u5f53\u524d\u5efa\u8bae\u5927\u5bb6\u5148\u8bb0\u4f4fFHS\u4e2d\u89c4\u8303\u7684\u76ee\u5f55\u4f5c\u7528\uff0c\u8fd9\u5c06\u5728\u4ee5\u540e\u6d3e\u4e0a\u7528\u573a\u3002<\/p>\n \u5728Linux\u7cfb\u7edf\u4e2d\u4e00\u5207\u90fd\u662f\u6587\u4ef6\uff0c\u786c\u4ef6\u8bbe\u5907\u4e5f\u4e0d\u4f8b\u5916\u3002\u65e2\u7136\u662f\u6587\u4ef6\uff0c\u5c31\u5fc5\u987b\u6709\u6587\u4ef6\u540d\u79f0\u3002\u7cfb\u7edf\u5185\u6838\u4e2d\u7684udev\u8bbe\u5907\u7ba1\u7406\u5668\u4f1a\u81ea\u52a8\u628a\u786c\u4ef6\u540d\u79f0\u89c4\u8303\u8d77\u6765\uff0c\u76ee\u7684\u662f\u8ba9\u7528\u6237\u901a\u8fc7\u8bbe\u5907\u6587\u4ef6\u7684\u540d\u5b57\u53ef\u4ee5\u731c\u51fa\u8bbe\u5907\u5927\u81f4\u7684\u5c5e\u6027\u4ee5\u53ca\u5206\u533a\u4fe1\u606f\u7b49\uff1b\u8fd9\u5bf9\u4e8e\u964c\u751f\u7684\u8bbe\u5907\u6765\u8bf4\u7279\u522b\u65b9\u4fbf\u3002\u53e6\u5916\uff0cudev\u8bbe\u5907\u7ba1\u7406\u5668\u7684\u670d\u52a1\u4f1a\u4e00\u76f4\u4ee5\u5b88\u62a4\u8fdb\u7a0b\u7684\u5f62\u5f0f\u8fd0\u884c\u5e76\u4fa6\u542c\u5185\u6838\u53d1\u51fa\u7684\u4fe1\u53f7\u6765\u7ba1\u7406\/dev\u76ee\u5f55\u4e0b\u7684\u8bbe\u5907\u6587\u4ef6\u3002Linux\u7cfb\u7edf\u4e2d\u5e38\u89c1\u7684\u786c\u4ef6\u8bbe\u5907\u7684\u6587\u4ef6\u540d\u79f0\u5982\u88686-2\u6240\u793a\u3002<\/p>\n \u88686-2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u5e38\u89c1\u7684\u786c\u4ef6\u8bbe\u5907\u53ca\u5176\u6587\u4ef6\u540d\u79f0<\/p>\n6.1 \u4e00\u5207\u4ece\u201c\/\u201d\u5f00\u59cb<\/strong><\/span><\/h5>\n
\n\n
\n \u76ee\u5f55\u540d\u79f0<\/td>\n \u5e94\u653e\u7f6e\u6587\u4ef6\u7684\u5185\u5bb9<\/td>\n<\/tr>\n \n \/boot<\/td>\n \u7cfb\u7edf\u542f\u52a8\u6587\u4ef6\uff0c\u5982\u5185\u6838\u548c\u542f\u52a8\u83dc\u5355<\/td>\n<\/tr>\n \n \/dev<\/td>\n \u8bbe\u5907\u6587\u4ef6\uff0c\u4ee3\u8868\u7cfb\u7edf\u4e2d\u7684\u786c\u4ef6\u8bbe\u5907<\/td>\n<\/tr>\n \n \/etc<\/td>\n \u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u548c\u542f\u52a8\u811a\u672c<\/td>\n<\/tr>\n \n \/root<\/td>\n \u7ba1\u7406\u5458\u7684\u4e2a\u4eba\u4e3b\u76ee\u5f55<\/td>\n<\/tr>\n \n \/home<\/td>\n \u7528\u6237\u7684\u4e2a\u4eba\u4e3b\u76ee\u5f55<\/td>\n<\/tr>\n \n \/bin<\/td>\n \u57fa\u672c\u7528\u6237\u547d\u4ee4\uff0c\u53ef\u5728\u5355\u7528\u6237\u6a21\u5f0f\u4e0b\u4f7f\u7528<\/td>\n<\/tr>\n \n \/lib<\/td>\n \u7cfb\u7edf\u5171\u4eab\u5e93\uff0c\u4f9b\/bin\u548c\/sbin\u547d\u4ee4\u4f7f\u7528<\/td>\n<\/tr>\n \n \/sbin<\/td>\n \u7cfb\u7edf\u7ba1\u7406\u547d\u4ee4\uff0c\u4f9b\u7ba1\u7406\u5458\u4f7f\u7528<\/td>\n<\/tr>\n \n \/media<\/td>\n \u6302\u8f7d\u70b9\u76ee\u5f55\uff0c\u7528\u4e8e\u53ef\u79fb\u52a8\u8bbe\u5907<\/td>\n<\/tr>\n \n \/opt<\/td>\n \u7b2c\u4e09\u65b9\u5e94\u7528\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n \n \/srv<\/td>\n \u670d\u52a1\u6570\u636e\u76ee\u5f55\uff0c\u5b58\u653e\u7f51\u7edc\u670d\u52a1\u6570\u636e<\/td>\n<\/tr>\n \n \/tmp<\/td>\n \u4e34\u65f6\u6587\u4ef6\u76ee\u5f55\uff0c\u6240\u6709\u7528\u6237\u5747\u53ef\u8bbf\u95ee<\/td>\n<\/tr>\n \n \/proc<\/td>\n \u865a\u62df\u6587\u4ef6\u7cfb\u7edf\uff0c\u63d0\u4f9b\u8fdb\u7a0b\u548c\u5185\u6838\u4fe1\u606f<\/td>\n<\/tr>\n \n \/usr\/local<\/td>\n \u672c\u5730\u5b89\u88c5\u7684\u8f6f\u4ef6\u548c\u5e94\u7528\u7a0b\u5e8f<\/td>\n<\/tr>\n \n \/usr\/sbin<\/td>\n \u7cfb\u7edf\u7ba1\u7406\u5458\u4f7f\u7528\u7684\u975e\u57fa\u672c\u7ba1\u7406\u547d\u4ee4<\/td>\n<\/tr>\n \n \/usr\/share<\/td>\n \u5171\u4eab\u6570\u636e\uff0c\u5982\u6587\u6863\u548c\u5e2e\u52a9\u6587\u4ef6<\/td>\n<\/tr>\n \n \/var<\/td>\n \u52a8\u6001\u6570\u636e\uff0c\u5982\u65e5\u5fd7\u6587\u4ef6\u548c\u4e34\u65f6\u6587\u4ef6<\/td>\n<\/tr>\n \n \/lost+found<\/td>\n \u6587\u4ef6\u7cfb\u7edf\u6062\u590d\u533a\uff0c\u5b58\u653e\u4e22\u5931\u7684\u6587\u4ef6\u788e\u7247<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n 6.2\u00a0\u7269\u7406\u8bbe\u5907\u7684\u547d\u540d\u89c4\u5219<\/strong><\/span><\/h5>\n