{"id":295341,"date":"2025-01-02T04:05:18","date_gmt":"2025-01-01T20:05:18","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxtgjczznzws.html"},"modified":"2025-01-02T04:05:18","modified_gmt":"2025-01-01T20:05:18","slug":"lxtgjczznzws","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxtgjczznzws.html","title":{"rendered":"Linux\u7cfb\u7edf\u5173\u673a\u64cd\u4f5c\u6307\u5357\uff1a\u638c\u63e1Shutdown\u547d\u4ee4\u7684\u591a\u79cd\u7528\u6cd5\u4e0e\u6280\u5de7"},"content":{"rendered":"

\u6bcf\u4e2aLinux<\/a>\u4f7f\u7528\u8005\u90fd\u5e94\u719f\u6089Linux<\/a>\u7cfb\u7edf\u7684\u5173\u673a\u64cd\u4f5c\u3002\u8fd9\u4e00\u64cd\u4f5c\u5173\u4e4e\u5230\u59a5\u5584\u7ed3\u675f\u7cfb\u7edf\u8fdb\u7a0b\u3001\u786e\u4fdd\u6570\u636e\u4e0d\u53d7\u635f\u5bb3\u7b49\u591a\u91cd\u5173\u952e\u56e0\u7d20\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4f1a\u4e3a\u5927\u5bb6\u9010\u4e00\u8bb2\u89e3\u76f8\u5173\u7684\u64cd\u4f5c\u6307\u4ee4\u3002<\/p>\n

Shutdown\u547d\u4ee4<\/a><\/b><\/p>\n

Linux\u7cfb\u7edf\u4e2d\uff0cshutdown\u547d\u4ee4\u662f\u5e38\u7528\u7684\u5173\u673a\u64cd\u4f5c\u6307\u4ee4\u3002\u5b83\u5177\u5907\u591a\u79cd\u64cd\u4f5c\u65b9\u5f0f\uff0c\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u5173\u673a\u9700\u6c42\u3002\u4f8b\u5982\uff0c\u8f93\u5165\u201cshutdown -h now\u201d\u5373\u53ef\u5b9e\u73b0\u5373\u523b\u5173\u673a\u3002\u201c-h\u201d\u53c2\u6570\u8d1f\u8d23\u4f7f\u7cfb\u7edf\u505c\u6b62\uff0c\u201cnow\u201d\u5219\u8868\u660e\u7acb\u5373\u6267\u884c\u3002\u6b64\u5916\uff0cshutdown\u547d\u4ee4\u8fd8\u80fd\u8bbe\u5b9a\u5173\u673a\u65f6\u95f4\uff0c\u5982\u201cshutdown -h 10\u201d\u8868\u793a\u7cfb\u7edf\u5c06\u572810\u5206\u949f\u540e\u81ea\u52a8\u5173\u673a\u3002\u8fd9\u4e00\u529f\u80fd\u7279\u522b\u9002\u7528\u4e8e\u9700\u8981\u63d0\u524d\u89c4\u5212\u5173\u673a\u65f6\u95f4\u7684\u60c5\u51b5\u3002\u5728\u5171\u4eab\u7684Linux\u670d\u52a1\u5668\u6216\u4e2a\u4eba\u5f00\u53d1\u73af\u5883\u4e2d\uff0c\u4e3a\u4e86\u9632\u6b62\u6570\u636e\u4e22\u5931\u6216\u4efb\u52a1\u4e2d\u65ad\uff0c\u6211\u4eec\u53ef\u901a\u8fc7\u5408\u7406\u8fd0\u7528shutdown\u547d\u4ee4\uff0c\u5e76\u8bbe\u7f6e\u9002\u5f53\u7684\u5173\u673a\u5ef6\u8fdf\u65f6\u95f4\u6765\u907f\u514d\u7a81\u7136\u5173\u673a\u3002<\/p>\n

\u5728Linux\u7684\u591a\u7528\u6237\u73af\u5883\u4e2dlinux\u7cfb\u7edf\u5173\u673a\u6307\u4ee4<\/strong>\uff0c\u5f53\u4f7f\u7528shutdown\u547d\u4ee4\u65f6\uff0c\u4f1a\u5411\u6240\u6709\u6b63\u5728\u7ebf\u7684\u7528\u6237\u53d1\u51fa\u63d0\u9192\u3002\u6bd4\u5982\uff0c\u5f53\u6211\u4eec\u8f93\u5165\u201cshutdown -r +15 '\u7cfb\u7edf\u5c06\u572815\u5206\u949f\u540e\u91cd\u542f\uff0c\u8bf7\u786e\u4fdd\u6570\u636e\u5df2\u4fdd\u5b58'\u201d\uff0c\u6240\u6709\u7528\u6237\u90fd\u4f1a\u770b\u5230\u8fd9\u6761\u4fe1\u606f\uff0c\u4ece\u800c\u6709\u8db3\u591f\u65f6\u95f4\u4fdd\u5b58\u624b\u5934\u7684\u6570\u636e\uff0c\u4ee5\u9632\u4e0d\u6d4b\u3002\u8fd9\u4e00\u529f\u80fd\u663e\u793a\u4e86shutdown\u547d\u4ee4\u5728\u5b89\u5168\u6027\u548c\u7528\u6237\u53cb\u597d\u6027\u65b9\u9762\u7684\u4f18\u52bf\u3002<\/p>\n

Poweroff\u547d\u4ee4<\/b><\/p>\n

\u6267\u884cPoweroff\u6307\u4ee4\u4e0e\u201cshutdown -h now\u201d\u4f5c\u7528\u76f8\u540c\u3002\u8be5\u6307\u4ee4\u4f1a\u76f4\u63a5\u5207\u65ad\u7cfb\u7edf\u7535\u6e90\u3002\u9047\u5230\u4e0d\u9700\u8981\u8fdb\u884c\u590d\u6742\u914d\u7f6e\uff0c\u53ea\u60f3\u8fc5\u901f\u5b8c\u5168\u5173\u95ed\u7cfb\u7edf\u65f6\uff0c\u8fd9\u4e2a\u6307\u4ee4\u5c31\u6d3e\u4e0a\u7528\u573a\u4e86\u3002\u6bd4\u5982\u5728\u4e2a\u4ebaLinux\u6d4b\u8bd5\u73af\u5883\u4e2d\uff0c\u82e5\u6ca1\u6709\u5173\u952e\u8fdb\u7a0b\u6b63\u5728\u8fd0\u884c\uff0c\u60f3\u5feb\u901f\u5173\u673a\u4ee5\u8282\u7701\u80fd\u6e90\u7b49\uff0c\u5c31\u53ef\u4ee5\u653e\u5fc3\u4f7f\u7528poweroff\u3002<\/p>\n

linux\u5173\u673a\u547d\u4ee4\u884c_linux\u7cfb\u7edf\u5173\u673a\u6307\u4ee4_linux\u7cfb\u7edf\u5173\u673a\u547d\u4ee4\u5927\u5168<\/p>\n

Poweroff\u64cd\u4f5c\u867d\u7b80\u4fbf\u5feb\u6377\uff0c\u5374\u4e0d\u53ef\u5ffd\u89c6\u6570\u636e\u4fdd\u62a4\u3002\u5728\u542f\u52a8\u6b64\u547d\u4ee4\u524d\uff0c\u52a1\u5fc5\u786e\u8ba4\u5173\u952e\u6570\u636e\u64cd\u4f5c\u5df2\u6682\u505c\u3002Poweroff\u4e0d\u5177\u5907shutdown\u90a3\u6837\u7684\u7f13\u51b2\uff0c\u4e00\u65e6\u8fd0\u884c\uff0c\u7535\u6e90\u5373\u523b\u5207\u65ad\uff0c\u672a\u4fdd\u5b58\u7684\u6570\u636e\u6050\u5c06\u4e22\u5931\u3002<\/p>\n

Reboot\u547d\u4ee4<\/b><\/p>\n

\u91cd\u542f\u7cfb\u7edf\u4e3b\u8981\u4f9d\u8d56Reboot\u6307\u4ee4\u3002\u7cfb\u7edf\u8f6f\u4ef6\u6216\u5185\u6838\u66f4\u65b0\u540elinux\u7cfb\u7edf\u5173\u673a\u6307\u4ee4<\/strong>\uff0c\u4e00\u822c\u8981\u7528\u8fd9\u4e2a\u6307\u4ee4\u6765\u786e\u4fdd\u65b0\u8bbe\u7f6e\u80fd\u751f\u6548\u3002\u6bd4\u5982\uff0c\u5728\u6267\u884c\u4e86\u201cyum update -y\u201d\u8fdb\u884c\u7cfb\u7edf\u5347\u7ea7\u540e\uff0c\u8bb8\u591a\u66f4\u65b0\u5185\u5bb9\u5fc5\u987b\u901a\u8fc7\u91cd\u542f\u7cfb\u7edf\u6765\u5b8c\u6210\u5b89\u88c5\u3002\u6b64\u65f6\uff0c\u76f4\u63a5\u4f7f\u7528\u201creboot\u201d\u6307\u4ee4\u5373\u53ef\u5b9e\u73b0\u7cfb\u7edf\u91cd\u542f\u3002<\/p>\n

linux\u7cfb\u7edf\u5173\u673a\u6307\u4ee4_linux\u5173\u673a\u547d\u4ee4\u884c_linux\u7cfb\u7edf\u5173\u673a\u547d\u4ee4\u5927\u5168<\/p>\n

\u5728\u7cfb\u7edf\u91cd\u542f\u524d\uff0c\u82e5\u9700\u901a\u77e5\u5176\u4ed6\u7528\u6237\uff0c\u53ef\u6267\u884c\u201cshutdown -r now\u201d\u6307\u4ee4\u3002\u6b64\u6307\u4ee4\u4f1a\u5728\u91cd\u542f\u524d\u7ed9\u4e88\u7528\u6237\u4e00\u6bb5\u51c6\u5907\u65f6\u95f4\uff0c\u4f46\u201creboot\u201d\u6307\u4ee4\u7f3a\u4e4f\u6b64\u7c7b\u901a\u77e5\u529f\u80fd\uff0c\u6545\u5728\u591a\u7528\u6237\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u65f6\u9700\u683c\u5916\u5c0f\u5fc3\u3002<\/p>\n

Init\u547d\u4ee4<\/b><\/p>\n

Init\u547d\u4ee4\u662f\u7cfb\u7edf\u8fd0\u884c\u7ea7\u522b\u7684\u8f6c\u6362\u5de5\u5177linux\u8bbe\u7f6e\u9ed8\u8ba4\u7f51\u5173\uff0c\u540c\u65f6\u5177\u5907\u5173\u673a\u529f\u80fd\u3002\u6bd4\u5982\uff0c\u201cinit 0\u201d\u5c31\u80fd\u5b9e\u73b0\u7cfb\u7edf\u5173\u95ed\u3002\u6bcf\u4e2a\u8fd0\u884c\u7ea7\u522b\u90fd\u6709\u5176\u7279\u5b9a\u542b\u4e49\uff0c\u5176\u4e2d0\u4ee3\u8868\u5173\u673a\uff0c6\u5219\u4ee3\u8868\u91cd\u542f\u3002\u5f53\u6211\u4eec\u5bf9Linux\u7684\u8fd0\u884c\u7ea7\u522b\u6709\u4e86\u6df1\u5165\u4e86\u89e3\uff0c\u4f7f\u7528init\u547d\u4ee4\u8fdb\u884c\u5173\u673a\u6216\u91cd\u542f\u4fbf\u663e\u5f97\u66f4\u4e3a\u6df1\u5965\u3002<\/p>\n

\u73b0\u4ee3Linux\u7cfb\u7edf\u66f4\u503e\u5411\u4e8e\u91c7\u7528upstart\u6216systemd\u7b49\u521d\u59cb\u5316\u5de5\u5177\uff0c\u8fd9\u4f7f\u5f97init\u547d\u4ee4\u7684\u4f7f\u7528\u4e0d\u5982\u65e9\u671f\u7cfb\u7edf\u90a3\u4e48\u9891\u7e41\u3002\u4e0d\u8fc7\uff0c\u5bf9\u4e8e\u90a3\u4e9b\u8fd8\u5728\u4f7f\u7528\u65e7\u7248Linux\u7cfb\u7edf\u6216\u8005\u719f\u6089\u4f20\u7edfLinux\u64cd\u4f5c\u7684\u7528\u6237\u6765\u8bf4\uff0cinit\u547d\u4ee4\u4f9d\u7136\u6709\u5176\u91cd\u8981\u6027\u3002<\/p>\n

Halt\u547d\u4ee4<\/b><\/p>\n

linux\u7cfb\u7edf\u5173\u673a\u6307\u4ee4_linux\u5173\u673a\u547d\u4ee4\u884c_linux\u7cfb\u7edf\u5173\u673a\u547d\u4ee4\u5927\u5168<\/p>\n

Halt\u6307\u4ee4\u4e0epoweroff\u6307\u4ee4\u529f\u80fd\u76f8\u8fd1\u3002\u6b64\u6307\u4ee4\u80fd\u7ec8\u6b62\u6240\u6709\u8fd0\u884c\u4e2d\u7684\u7a0b\u5e8f\uff0c\u5e76\u5c06\u7cfb\u7edf\u8f6c\u4e3a\u505c\u6b62\u6a21\u5f0f\u3002\u5728\u64cd\u4f5c\u4e00\u4e9b\u7b80\u5355\u7684Linux\u5d4c\u5165\u5f0f\u8bbe\u5907\u6216\u914d\u7f6e\u7b80\u5355\u7684\u7cfb\u7edf\u65f6\uff0chalt<\/a>\u6307\u4ee4\u5f80\u5f80\u80fd\u66f4\u4fbf\u6377\u5730\u5b9e\u73b0\u5173\u673a\u3002<\/p>\n

\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0chalt\u547d\u4ee4\u5e76\u4e0d\u80fd\u786e\u4fdd\u5728\u6240\u6709\u786c\u4ef6\u4e0a\u90fd\u80fd\u987a\u5229\u5b8c\u6210\u5173\u673a\u3002\u90e8\u5206\u786c\u4ef6\u53ef\u80fd\u9700\u8981\u8c03\u6574\u7535\u6e90\u7ba1\u7406\u8bbe\u7f6e\uff0c\u6216\u8005\u9075\u5faa\u7279\u5b9a\u7684\u5173\u673a\u6b65\u9aa4\u3002\u56e0\u6b64\uff0c\u5728\u5e94\u7528halt\u547d\u4ee4\u524d\uff0c\u5bf9\u76ee\u6807\u8bbe\u5907\u8fdb\u884c\u6d4b\u8bd5\u662f\u5f88\u6709\u5fc5\u8981\u7684\u3002<\/p>\n

\u5e38\u7528\u989d\u5916\u53c2\u6570<\/b><\/p>\n

linux\u5173\u673a\u547d\u4ee4\u884c_linux\u7cfb\u7edf\u5173\u673a\u547d\u4ee4\u5927\u5168_linux\u7cfb\u7edf\u5173\u673a\u6307\u4ee4<\/p>\n

\u5173\u673a\u6307\u4ee4\u4e2d\u5305\u542b\u4e00\u4e9b\u5b9e\u7528\u7684\u9644\u52a0\u9009\u9879\u3002\u4f8b\u5982\uff0c\u901a\u8fc7\u201cshutdown -c\u201d\u6307\u4ee4\uff0c\u53ef\u4ee5\u53d6\u6d88\u5148\u524d\u7684\u5173\u673a\u8ba1\u5212\u3002\u82e5\u4e4b\u524d\u8bbe\u5b9a\u7684\u5173\u673a\u65f6\u95f4\u8fc7\u65e9linux cp\uff0c\u6216\u8005\u5173\u673a\u524d\u60c5\u51b5\u6709\u53d8\uff0c\u4e0d\u518d\u9700\u8981\u5173\u673a\uff0c\u8fd9\u4e2a\u9009\u9879\u5c31\u80fd\u7528\u6765\u53d6\u6d88\u5173\u673a\u4efb\u52a1\u3002<\/p>\n

\u8fd8\u6709\u4e00\u4e2a\u8bbe\u7f6e\u662f\u91c7\u7528\u201creboot -f\u201d\u547d\u4ee4\u5f3a\u5236\u8fdb\u884c\u7cfb\u7edf\u91cd\u542f\uff0c\u5373\u4fbf\u6709\u7a0b\u5e8f\u5728\u963b\u6320\u91cd\u542f\u8fc7\u7a0b\uff0c\u8be5\u6307\u4ee4\u4e5f\u4f1a\u5c3d\u529b\u5f3a\u5236\u542f\u52a8\u7cfb\u7edf\u3002\u7136\u800c\uff0c\u8fd9\u79cd\u5f3a\u5236\u91cd\u542f\u5fc5\u987b\u5c0f\u5fc3\u64cd\u4f5c\uff0c\u56e0\u4e3a\u53ef\u80fd\u4f1a\u9020\u6210\u6570\u636e\u672a\u4fdd\u5b58\u800c\u4e22\u5931\uff0c\u4ee5\u53ca\u6b63\u5728\u8fd0\u884c\u7684\u5173\u952e\u7a0b\u5e8f\u53ef\u80fd\u51fa\u73b0\u6545\u969c\u3002<\/p>\n

\u4f60\u77e5\u9053\u5728\u5e38\u7528\u7684Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u54ea\u6761\u5173\u673a\u547d\u4ee4\u6700\u9700\u8c28\u614e\u64cd\u4f5c\u5417\uff1f\u5e0c\u671b\u5404\u4f4d\u80fd\u70b9\u8d5e\u3001\u7559\u8a00\u5e76\u8f6c\u53d1\u8fd9\u7bc7\u6587\u7ae0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u6bcf\u4e2aLinux\u4f7f\u7528\u8005\u90fd\u5e94\u719f\u6089Linux\u7cfb\u7edf\u7684\u5173\u673a\u64cd\u4f5c\u3002Linux\u7cfb\u7edf\u4e2d\uff0cshutdown\u547d\u4ee4\u662f\u5e38\u7528\u7684\u5173\u673a\u64cd\u4f5c\u6307\u4ee4\u3002Init\u547d\u4ee4\u662f\u7cfb\u7edf\u8fd0\u884c\u7ea7\u522b\u7684\u8f6c\u6362\u5de5\u5177\uff0c\u540c\u65f6\u5177\u5907\u5173\u673a\u529f\u80fd\u3002\u4f60\u77e5\u9053\u5728\u5e38\u7528\u7684Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u54ea\u6761\u5173\u673a\u547d\u4ee4\u6700\u9700\u8c28\u614e\u64cd\u4f5c\u5417\uff1f<\/p>\n","protected":false},"author":1,"featured_media":295342,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[5111,109,2057,1394,3545],"class_list":["post-295341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-halt","tag-linux","tag-p-15","tag-s-13","tag-dyhhj"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295341","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=295341"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295341\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/295342"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=295341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=295341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=295341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}