{"id":270643,"date":"2023-04-25T20:24:48","date_gmt":"2023-04-25T12:24:48","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxtdyhdtxgbh.html"},"modified":"2023-04-25T20:24:48","modified_gmt":"2023-04-25T12:24:48","slug":"lxtdyhdtxgbh","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxtdyhdtxgbh.html","title":{"rendered":"Linux\u7cfb\u7edf\u591a\u7528\u6237\u7684\u7279\u6027\u5173\u95ed\u548c\u91cd\u542fLinux\u9879\u76ee\u5316\u6559\u7a0b"},"content":{"rendered":"

Linux<\/a>\u547d\u4ee4<\/a>\u5927\u5168\uff081\uff09<\/p>\n

\u6240\u7528\u7684\u53c2\u8003\u4e66:Linux\u5b9e\u7528\u6559\u7a0b\u7b2c\u4e09\u7248\u3001Linux\u64cd\u4f5c\u7cfb\u7edf<\/a>\u9879\u76ee\u5316\u6559\u7a0b<\/p>\n

\u6240\u9700\u7684\u8f6f\u4ef6\u4e3aCENTos7\u548cVMWAREworkstationpro<\/p>\n

\u5b57\u7b26\u754c\u9762\u57fa\u7840:<\/p>\n

\u5b89\u88c5Linux\u7cfb\u7edf\u540e\uff0c\u7cfb\u7edf\u542f\u52a8\u9ed8\u8ba4\u6b65\u5165\u7684\u56fe\u5f62\u5316\u754c\u9762\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u6b65\u5165\u5b57\u7b26\u754c\u9762\uff0c\u91cd\u542f\u4ee5\u540e\u518d\u751f\u6548<\/p>\n

[root@rhel~]#systemctlget-default<\/p>\n

\u4f1a\u51fa\u73b0graphical.target,\u8fd9\u6761\u8bcd\u53e5\u8868\u793a\u56fe\u5f62\u5316\u754c\u9762<\/p>\n

[root@rhel~]#systemctlset-defaultmulti-user.target<\/p>\n

\u5c06multi-user.target\u76ee\u6807\u8bbe\u7f6e\u4e3a\u542f\u52a8\u8ba1\u7b97\u673a\u7cfb\u7edf\u540e\u8981\u6b65\u5165\u7684\u9ed8\u8ba4\u76ee\u6807multi-user.target\u8868\u793a\u5b57\u7b26\u754c\u9762<\/p>\n

\u865a\u62df\u63a7\u5236\u53f0<\/p>\n

Linux\u7cfb\u7edf\u53ef\u4ee5\u540c\u65f6\u63a5\u6536\u591a\u4e2a\u7528\u6237\u767b\u5165,\u8fd8\u5bb9\u8bb8\u7528\u6237\u5728\u540c\u4e00\u65f6\u95f4\u8fdb\u884c\u591a\u6b21\u767b\u9646\uff0c\u7531\u4e8eLinux\u63d0\u4f9b\u4e86\u865a\u62df\u63a7\u5236\u53f0\u7684\u8bbf\u95ee\u65b9\u6cd5\u3002\u5728\u5b57\u7b26\u754c\u9762\u4e0b\uff0c\u865a\u62df\u63a7\u5236\u53f0\u7684\u9009\u62e9\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b\u3010ALT\u3011\u952e\u548c\u4e00\u4e2a\u529f\u80fd\u952e\u6765\u5b9e\u73b0\u3002\u4e00\u822c\u4f7f\u7528\u3010F1\u3011-\u3010F6\u3011\u952e<\/p>\n

Eg:\u7528\u6237\u767b\u5165\u540e\uff0c\u6309\u3010ALT+F2\u3011\u7ec4\u5408\u952e\uff0c\u7528\u6237\u53ef\u4ee5\u770b\u89c1login:\u63d0\u793a\u7b26\uff0c\u8bf4\u660e\u7528\u6237\u6b65\u5165\u4e86\u7b2c\u4e8c\u4e2a\u865a\u62df\u63a7\u5236\u53f0\u4e4b\u540e\u53ea\u9700\u6309\u3010ALT+F1\u7ec4\u5408\u952e\u3011\u5c31\u53ef\u4ee5\u56de\u5230\u7b2c\u4e00\u4e2a\u63a7\u5236\u53f0<\/p>\n

\u5047\u5982\u7528\u6237\u5728\u56fe\u5f62\u754c\u9762\u4e0b,\u8fd9\u4e48\u53ef\u4ee5\u4f7f\u7528\u3010Ctrl+alt+F2\u3011~\u3010Ctrl+alt+F6\u3011\u7ec4\u5408\u952e\u5207\u6362\u5b57\u7b26\u865a\u62df\u63a7\u5236\u53f0\uff0c\u4f7f\u7528\u3010ctrl+Alt+F1\u3011\u7ec4\u5408\u952e\u53ef\u4ee5\u5207\u6362\u5230\u56fe\u5f62\u754c\u9762\uff0c\u865a\u62df\u63a7\u5236\u53f0\u53ef\u4f7f\u7528\u6237\u540c\u65f6\u5728\u591a\u4e2a\u63a7\u5236\u53f0\u4e0a\u5de5\u4f5c\uff0c\u771f\u6b63\u5f70\u663eLinux\u7cfb\u7edf\u591a\u7528\u6237\u7684\u7279\u70b9<\/p>\n

\u5173\u6389\u548c\u91cd\u542fLinux\u7cfb\u7edf<\/p>\n

shutdown\u547d\u4ee4<\/p>\n

shutdown\u547d\u4ee4\u53ef\u4ee5\u5b89\u5168\u7684\u5173\u6389\u6216\u91cd\u542fLinux\u7cfb\u7edf<\/p>\n

\u5728\u7cfb\u7edf\u6b7b\u673a\u524d\u4f7f\u7528shutdown\u547d\u4ee4\uff0c\u7cfb\u7edf\u7ba1\u7406\u5458\u4f1a\u901a\u77e5\u4e00\u6761\u8b66\u544a\u4fe1\u606f\u7ed9\u6240\u6709\u767b\u9646\u7684\u7528\u6237\uff0c\u544a\u8bc9\u5979\u4eec\u7cfb\u7edf\u5373\u5c06\u5173\u6389\uff0c\u65b0\u7684\u7528\u6237\u4e0d\u80fd\u5728\u767b\u9646\uff0c\u76f4\u63a5\u6b7b\u673a\u6216\u5219\u5ef6\u540e\u4e00\u5b9a\u65f6\u95f4\u624d\u6b7b\u673a\u90fd\u662f\u53ef\u80fd\u7684\uff0c\u8fd8\u53ef\u80fd\u91cd\u542f<\/p>\n

Shutdown\u547d\u4ee4\u8fd8\u5bb9\u8bb8\u7528\u6237\u6307\u5b9a\u4e00\u4e2a\u65f6\u95f4\u53c2\u6570\uff0c\u8be5\u53c2\u6570\u53ef\u4ee5\u662f\u4e00\u4e2a\u7cbe\u786e\u5730\u65f6\u95f4\uff0c\u4e5f\u53ef\u4ee5\u662f\u73b0\u4eca\u5f00\u59cb\u7684\u4e00\u4e2a\u65f6\u95f4\u6bb5\uff0c\u7cbe\u786e\u65f6\u95f4\u7684\u683c\u5f0f\u662fhh:mm\uff0c\u8868\u793a\u5c0f\u65f6\u548c\u5206\u949f\uff0c\u65f6\u95f4\u6bb5\u7531+\u548c\u5206\u949f\u6570\u8868\u793a\u3002<\/p>\n

\u547d\u4ee4\u53e5\u578b<\/p>\n

Shutdown[\u9009\u9879][\u65f6\u95f4][\u8b66\u544a\u4fe1\u606f]<\/p>\n

win10\u5173\u95ed\u5e94\u7528\u5546\u5e97\u81ea\u52a8\u66f4\u65b0\u5e94\u7528_linux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f_linux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5f53\u9009\u9879\u4e3a-k\u65f6\uff0c\u610f\u5473\u7740\u5e76\u4e0d\u6267\u884cshutdownlinux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f<\/strong>\uff0c\u53ea\u662f\u53d1\u51fa\u8b66\u544a\u4fe1\u606f\u7ed9\u6240\u6709\u7528\u6237\u3002<\/p>\n

\u5f53\u9009\u9879\u4e3a-r\u65f6\uff0c\u610f\u5473\u7740\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf<\/p>\n

\u5f53\u9009\u9879\u4e3a-h\u65f6\uff0c\u610f\u5473\u7740\u5173\u6389\u7cfb\u7edf<\/p>\n

\u8fde\u4efb\u6027\u4e3a-c\u65f6\uff0c\u610f\u5473\u7740\u53d6\u6d88\u8fd0\u884cshutdown<\/p>\n

Eg:<\/p>\n

\u7acb\u523b\u5173\u6389\u8ba1\u7b97\u673a\u7cfb\u7edf<\/p>\n

[root@rhel~]#shutdown-hnow<\/p>\n

\u5b9a\u65f645\u5206\u949f\u540e\u5173\u6389\u8ba1\u7b97\u673a\u7cfb\u7edf<\/p>\n

[root@rhel~]#shutdown-h+45<\/p>\n

\/\/\u5728\u8fd9\u513f\u4f7f\u7528shutdown-h45\u548cshutdown-h+45\u8d77\u5230\u4e00\u6837\u4f5c\u7528<\/p>\n

\u7acb\u523b\u91cd\u65b0\u542f\u52a8\u8ba1\u7b97\u673a\u7cfb\u7edf,\u5e76\u53d1\u51fa\u8b66\u544a\u4fe1\u606f<\/p>\n

[root@rhel~]#shutdown-rnow\u201csystemwillberebootnow.\u201d<\/p>\n

\u5b9a\u65f6\u57281\u70b938\u5206\u91cd\u65b0\u542f\u52a8\u8ba1\u7b97\u673a\u7cfb\u7edf<\/p>\n

[root@rhel~]#shutdown-r01:38<\/p>\n

halt\u547d\u4ee4<\/p>\n

\u4f7f\u7528halt\u547d\u4ee4\u5c31\u662f\u8c03\u7528shutdown-h\u547d\u4ee4\u6267\u884c\u6b7b\u673a\u4efb\u52a1<\/p>\n

\u547d\u4ee4\u53e5\u578b<\/p>\n

Halt[\u9009\u9879]<\/p>\n

linux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f_linux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f_win10\u5173\u95ed\u5e94\u7528\u5546\u5e97\u81ea\u52a8\u66f4\u65b0\u5e94\u7528<\/p>\n

\u5f53\u9009\u9879\u4e3a-w\u65f6\uff0c\u610f\u5473\u7740\u5e76\u4e0d\u771f\u6b63\u7684\u5173\u6389\u7cfb\u7edf\uff0c\u53ea\u662f\u5199\u5165\u5230\/var\/log\/wtmp\u6587\u4ef6\u4e2d<\/p>\n

\u8fde\u4efb\u6027\u4e3a-d\u65f6\uff0c\u610f\u5473\u7740\u5173\u6389\u7cfb\u7edf\uff0c\u4e0d\u628a\u8bb0\u5f55\u8bb2\u5230\/var\/log\/wtmp\u6587\u4ef6\u4e2d<\/p>\n

\u5f53\u9009\u9879\u4e3a-f\u65f6\uff0c\u610f\u5473\u7740\u6ca1\u6709\u8c03\u7528shutdown\u800c\u5f3a\u5236\u5173\u6389\u7cfb\u7edf<\/p>\n

Eg:<\/p>\n

\u4f7f\u7528halt\u547d\u4ee4\u5173\u6389\u7cfb\u7edf<\/p>\n

reboot\u547d\u4ee4<\/p>\n

Reboot\u7684\u5de5\u4f5c\u8fc7\u7a0b\u4e0ehalt\u76f8\u50cf\uff0c\u4e0d\u8fc7reboot\u662f\u5f15\u8d77\u8ba1\u7b97\u673a\u91cd\u542f\uff0c\u800chalt\u662f\u5f15\u8d77\u8ba1\u7b97\u673a\u5173\u6389\uff0c\u5b83\u7684\u9009\u9879\u4e0ehalt\u76f8\u50cf<\/p>\n

\u5f53\u9009\u9879\u4e3a-w\u65f6\uff0c\u610f\u5473\u7740\u5e76\u4e0d\u771f\u6b63\u7684\u5173\u6389\u7cfb\u7edf\uff0c\u53ea\u662f\u5199\u5165\u5230\/var\/log\/wtmp\u6587\u4ef6\u4e2d<\/p>\n

\u5f53\u9009\u9879\u4e3a-d\u65f6,\u610f\u5473\u7740\u91cd\u542f\u7cfb\u7edf\uff0c\u4e0d\u628a\u8bb0\u5f55\u8bb2\u5230\/var\/log\/wtmp\u6587\u4ef6\u4e2d<\/p>\n

\u5f53\u9009\u9879\u4e3a-f\u65f6\uff0c\u610f\u5473\u7740\u6ca1\u6709\u8c03\u7528shutdown\u800c\u5f3a\u5236\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e0b\u83b7\u5f97\u5e2e\u52a9<\/p>\n

\u4f7f\u7528man\u6307\u5357\u9875<\/p>\n

man\u662f\u4e00\u79cd\u663e\u793aUnix\/Linux\u5728\u7ebf\u6307\u5357\u7684\u547d\u4ee4\uff0c\u53ef\u4ee5\u62ff\u6765\u67e5\u770b\u547d\u4ee4\u3001\u51fd\u6570\u6216\u5219\u662f\u6587\u4ef6\u7684\u5e2e\u52a9\u6307\u5357\uff0c\u53e6\u5916\u5b83\u8fd8\u53ef\u4ee5\u663e\u793a\u4e00\u4e9bgzip\u538b\u7f29\u683c\u5f0f\u7684\u6587\u4ef6\uff0c\u6709\u4e0d\u61c2\u7684\u547d\u4ee4\u53ef\u4ee5\u7528man\u67e5\u770b\u8fd9\u4e2a\u547d\u4ee4\uff0c\u5199\u7a0b\u5e8f\u65f6\u6709\u4e0d\u4f1a\u7528\u7684\u51fd\u6570\u53ef\u4ee5\u7528man\u67e5\u770b\u8fd9\u4e2a\u51fd\u6570\u6709\u4e0d\u61c2\u7684\u6587\u4ef6\u4e5f\u53ef\u4ee5\u7528man\u67e5\u770b\u6587\u4ef6<\/p>\n

\u901a\u5e38\u60c5\u51b5\u4e0bman\u6307\u5357\u9875\u7684\u8d44\u6e90\u4e3b\u8981\u5750\u843d\/usr\/share\/man\u76ee\u5f55\u4e0b\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u663e\u793a<\/p>\n

[root@rhel~]#ls-d\/usr\/share\/man\/man?<\/p>\n

\u53ef\u4ee5\u7528\u4e00\u4e2a\u6570\u5b57\u6765\u8868\u793a\u6307\u5357\u9875\u7684\u4e0d\u540c\u7c7b\u578b<\/p>\n

\u53e5\u578b\u683c\u5f0f\u7c7b\u578b<\/p>\n

Man[\u9009\u9879][\u540d\u79f0]<\/p>\n

linux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f_win10\u5173\u95ed\u5e94\u7528\u5546\u5e97\u81ea\u52a8\u66f4\u65b0\u5e94\u7528_linux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5e2e\u52a9\u53c2\u6570\u7c7b\u578b<\/p>\n

\u5f53\u9009\u9879\u4e3a-a\u65f6\u610f\u5473\u7740\u5728\u6240\u6709\u7684man\u5e2e\u52a9\u6307\u5357\u4e2d\u641c\u7d22<\/p>\n

\u5f53\u9009\u9879\u4e3a-f\u65f6\u610f\u5473\u7740\u7b49\u4ef7\u4e8ewhatis\u547d\u4ee4\uff0c\u663e\u793a\u7ed9\u5b9a\u5173\u952e\u5b57\u7684\u7b80\u7565\u63cf\u8ff0\u4fe1\u606f<\/p>\n

\u5f53\u9009\u9879\u4e3a-p\u65f6\u610f\u5473\u7740\u6307\u5b9a\u5185\u5bb9\u4f7f\u7528\u5206\u9875\u7a0b\u5e8f<\/p>\n

\u5f53\u9009\u9879\u4e3a-M\u65f6\u610f\u5473\u7740\u5236\u8ba2man\u6307\u5357\u641c\u7d22\u7684\u8def\u5f84<\/p>\n

\u5f53\u9009\u9879\u4e3a-d\u65f6\uff0c\u4e3b\u8981\u7528\u4e8e\u68c0\u6d4blinux\u6e90\u4ee3\u7801\u5206\u6790\uff0c\u5047\u5982\u7528\u6237\u52a0\u5165\u4e86\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u5c31\u53ef\u4ee5\u7528\u8fd9\u4e2a\u9009\u9879\u68c0\u6d4b\u662f\u5426\u51fa\u9519\uff0c\u8fd9\u4e2a\u9009\u9879\u5e76\u4e0d\u4f1a\u5217\u4e3e\u6587\u4ef6\u5185\u5bb9<\/p>\n

\u5f53\u9009\u9879\u4e3a-w\u65f6\uff0c\u4e0d\u663e\u793a\u6307\u5357\u9875\u5185\u5bb9\uff0c\u53ea\u663e\u793a\u5c06\u88ab\u4f4e\u683c\u548c\u663e\u793a\u7684\u6587\u4ef6\u6240\u5728\u4f4d\u7f6e<\/p>\n

Eg:\u67e5\u8be2cat\u547d\u4ee4\u7684\u5e2e\u52a9\u4fe1\u606f<\/p>\n

[root@rhel~]#man-acat<\/p>\n

\u663e\u793apwd\u547d\u4ee4\u7684man\u6307\u5357\u9875<\/p>\n

[root@rhel~]#manpwd<\/p>\n

\u4f7f\u7528-help\u9009\u9879\u83b7\u53d6\u5e2e\u52a9<\/p>\n

\u4f7f\u7528-help\u9009\u9879\u53ef\u4ee5\u663e\u793a\u547d\u4ee4\u7684\u4f7f\u7528\u65b9\u5f0f\u4ee5\u53ca\u547d\u4ee4\u7684\u9009\u9879\u6db5\u4e49\uff0c\u53ea\u9700\u5728\u6240\u987b\u8981\u663e\u793a\u7684\u547d\u4ee4\u524d\u9762\u8f93\u5165--help\u9009\u9879\uff0c\u5c31\u53ef\u4ee5\u770b\u89c1\u6240\u67e5\u547d\u4ee4\u7684\u5e2e\u52a9\u5185\u5bb9\u4e86<\/p>\n

\u547d\u4ee4\u53e5\u578b:<\/p>\n

[\u547d\u4ee4]--help<\/p>\n

Eg:\u4f7f\u7528--help\u9009\u9879\u67e5\u770bmkdir\u547d\u4ee4\u7684\u5e2e\u52a9\u4fe1\u606f<\/p>\n

[root@rhel~]#mkdir--help<\/p>\n

Shell\u57fa\u7840<\/p>\n

\u5728linux\u7cfb\u7edf\u4e2d\uff0cshell<\/a>\u662f\u6700\u5e38\u4f7f\u7528\u7684\u7a0b\u5e8f\uff0c\u5176\u4e3b\u8981\u4f5c\u7528\u662f\u4fa6\u542c\u7528\u6237\u6307\u4ee4\u3001\u542f\u52a8\u547d\u4ee4\u6240\u6307\u5b9a\u7684\u8fdb\u7a0b\u5e76\u5c06\u7ed3\u679c\u8fd4\u56de\u7ed9\u7528\u6237,bash\u76ee\u524d\u662f\u5927\u591a\u6570Linux\u7cfb\u7edf\u9ed8\u8ba4\u7684shell<\/p>\n

Bash\u547d\u4ee4<\/p>\n

\u5f53\u767b\u9646\u7cfb\u7edf\u6216\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\u7a97\u53e3\u65f6\uff0c\u9996\u5148\u770b\u89c1\u7684\u662fbashShell\u63d0\u793a\u7b26\u3002Linux\u7cfb\u7edf\u7684\u6807\u51c6\u63d0\u793a\u7b26\u5305\u62ec\u4e86\u7528\u6237\u767b\u5165\u540d\u3001\u767b\u5f55\u7684\u4e3b\u673a\u540d\uff0c\u5f53\u524d\u6240\u5728\u7684\u5de5\u4f5c\u76ee\u5f55\u8def\u5f84\u548c\u63d0\u793a\u7b26\u53f7\u3002<\/p>\n

\u4ee5\u666e\u901a\u7528\u6237zhangsan\u767b\u9646\u540d\u4e3arhel\u7684\u4e3b\u673a\uff0c\u5b83\u7684\u5de5\u4f5c\u76ee\u5f55\u662f\/home\/zhangsan<\/p>\n

[zhangsan@rhel~]$<\/p>\n

\u4ee5root\u7528\u6237\u767b\u5165\u7cfb\u7edf\u7684\u63d0\u793a\u7b26\u5982\u4e0b\u6240\u793a<\/p>\n

[root@rhel~]#<\/p>\n

\u4e0d\u4ec5\u4e0d\u540c\u7684\u7528\u6237\u5916\uff0c\u63d0\u793a\u7b26\u53f7\u7531$\u5f04\u6210\u4e86#\uff0c\u6309\u7167bash\u7684\u4f20\u7edf\uff0c\u666e\u901a\u7528\u6237\u7684\u63d0\u793a\u7b26\u4ee5$\u7ed3\u5c3e\uff0c\u800c\u8d85\u7ea7\u7528\u6237\u4ee5#\u7ed3\u5c3e\uff0c\u63d0\u793a\u7b26\u7684\u6bcf\u4f4d\u90e8\u4efd\u90fd\u53ef\u4ee5\u8ba2\u5236<\/p>\n

\u8981\u8fd0\u884c\u547d\u4ee4\u7684\u8bddlinux\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f<\/strong>\uff0c\u53ea\u987b\u8981\u5728\u63d0\u793a\u7b26\u540e\u6572\u8fdb\u547d\u4ee4\uff0c\u4e4b\u540e\u6309\u56de\u8f66\u952e\uff0cshell\u5c06\u5728\u5176\u8def\u5f84\u4e2d\u641c\u7d22\u8fd9\u4e2a\u547d\u4ee4\uff0c\u627e\u5230\u4e4b\u540e\u5c31\u8fd0\u884c\uff0c\u5e76\u5728\u7ec8\u7aef\u91cc\u8f93\u51fa\u76f8\u5e94\u7684\u7ed3\u679clinux\u7cfb\u7edf\u6559\u7a0b\uff0c\u547d\u4ee4\u7ed3\u675f\u540e\uff0c\u518d\u7ed9\u51fa\u65b0\u7684\u63d0\u793a\u7b26\u3002<\/p>\n

\u4f8b:[zhangsan@rhel~]$whoami<\/p>\n

Zhangsan<\/p>\n

\/\/\u663e\u793a\u5f53\u524d\u767b\u5165Linux\u7cfb\u7edf\u7684\u7528\u6237\u662fzhangsan<\/p>\n

\u666e\u901a\u7528\u6237\u5411\u8d85\u7ea7\u7528\u6237\u7684\u8f6c\u6362<\/p>\n

[zhangsan@rhel~]$suroot\u4fee\u6539\u666e\u901a\u7528\u6237\u5230\u8d85\u7ea7\u7528\u6237<\/p>\n

\u5728\u8fd9\u513f\u5c5e\u4e8e\u5bc6\u7801<\/p>\n

[zhangsan@rhel~]#\/\/\u53d8\u4e3a\u8fd9\u4e2a\u8d85\u7ea7\u7528\u6237<\/p>\n

\u4e00\u4e2ashell\u547d\u4ee4\u53ef\u80fd\u5bcc\u542b\u4e00\u4e9b\u9009\u9879\u548c\u53c2\u6570\uff0c\u5176\u901a\u5e38\u683c\u5f0f\u4e3a<\/p>\n

[Shell\u547d\u4ee4][\u9009\u9879][\u53c2\u6570]<\/p>\n

\u4e0b\u8fb9\u4e3e\u4e00\u4e2a\u53cd\u4f8b\u6765\u8be6\u5c3d\u63cf\u8ff0Shell\u547d\u4ee4\u683c\u5f0f<\/p>\n

[root@rhel~]#ls-l\/root<\/p>\n

\u5176\u4e2d-l\u662f\u547d\u4ee4ls\u7684\u4e00\u4e2a\u9009\u9879\uff0c\u800c\/root\u5219\u662f\u53c2\u6570\u3002<\/p>\n

\u9009\u9879\u6709\u77ed\u547d\u4ee4\u9009\u9879\u548c\u957f\u547d\u4ee4\u9009\u9879\u4e24\u79cd<\/p>\n

\u4f8b1:[root@rhel~]#ls-l\/root<\/p>\n

\/\/\u8fd9\u4e2a\u547d\u4ee4\u4e3a\u77ed\u547d\u4ee4<\/p>\n

\u4e0b\u8fb9\u4e24\u79cd\u65b9\u5f0f\u4f7f\u7528\u4e86\u4e00\u6837\u7684\u7597\u6548<\/p>\n

[root@rhel~]#ls-l-a\/root<\/p>\n

[root@rhel~]#ls-la\/root<\/p>\n

\u4e0b\u8fb9\u8fd9\u4e2a\u5b9e\u4f8b\u5c31\u4f7f\u7528\u4e86\u957f\u547d\u4ee4\u884c\u9009\u9879<\/p>\n

[root@rhel~]#ls--size\/root<\/p>\n

\u5728linux\u7cfb\u7edf\u4e2d,\u547d\u4ee4\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u4e24\u5927\u7c7b<\/p>\n

Bash\u5916\u7f6e\u7684\u547d\u4ee4\u548c\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5047\u5982\u662fbash\u5916\u7f6e\u7684\u547d\u4ee4\uff0c\u5219\u7531bash\u8d1f\u8d23\u56de\u5e94\uff0c\u5018\u82e5\u662f\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u4e48shell\u4f1a\u627e\u51fa\u8be5\u5e94\u7528\u7a0b\u5e8f\uff0c\u4e4b\u540e\u5c06\u63a7\u5236\u6743\u4ea4\u7ed9\u5185\u6838\uff0c\u7531\u5185\u6838\u6267\u884c\u8be5\u5e94\u7528\u7a0b\u5e8f\uff0c\u6267\u884c\u5b8c\u4ee5\u540e\uff0c\u518d\u5c06\u63a7\u5236\u6743\u4ea4\u7ed9shell<\/p>\n

\u4f7f\u7528which\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u4ec0\u4e48\u547d\u4ee4\u662fbash\u5916\u7f6e\u7684\u547d\u4ee4\uff0c\u4ec0\u4e48\u662f\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u4f8b:\u67e5\u770becho\u548cls\u547d\u4ee4<\/p>\n

[root@rhel~]#whichecho<\/p>\n

[root@rhel~]#whichls<\/p>\n

3.4\u4f7f\u7528bash<\/p>\n

\u5e38\u7528\u63a7\u5236\u7ec4\u5408\u952e<\/p>\n

Ctrl+L:\u6e05\u5c4f<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5b89\u88c5Linux\u7cfb\u7edf\u540e\uff0c\u7cfb\u7edf\u542f\u52a8\u9ed8\u8ba4\u8fdb\u5165\u7684\u56fe\u5f62\u5316\u754c\u9762\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u8fdb\u5165\u5b57\u7b26\u754c\u9762\uff0c\u91cd\u542f\u4e4b\u540e\u518d\u751f\u6548\u4f7f\u7528halt\u547d\u4ee4\u5173\u95ed\u7cfb\u7edf\u5728linux\u7cfb\u7edf\u4e2d\uff0cshell\u662f\u6700\u5e38\u4f7f\u7528\u7684\u7a0b\u5e8f\uff0c\u5176\u4e3b\u8981\u4f5c\u7528\u662f\u4fa6\u542c\u7528\u6237\u6307\u4ee4\u3001\u542f\u52a8\u547d\u4ee4\u6240\u6307\u5b9a\u7684\u8fdb\u7a0b\u5e76\u5c06\u7ed3\u679c\u8fd4\u56de\u7ed9\u7528\u6237,bash\u76ee\u524d\u662f\u5927\u591a\u6570Linux\u7cfb\u7edf\u9ed8\u8ba4\u7684shellBash\u5185\u7f6e\u7684\u547d\u4ee4\u548c\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528which\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u54ea\u4e9b\u547d\u4ee4\u662fbash\u5185\u7f6e\u7684\u547d\u4ee4\uff0c\u54ea\u4e9b\u662f\u5e94\u7528\u7a0b\u5e8f<\/p>\n","protected":false},"author":1,"featured_media":270644,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-270643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/270643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=270643"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/270643\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/270644"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=270643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=270643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=270643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}