id: 5962a8fead7544e98f17edf37482a6c8
parent_id: 
item_type: 1
item_id: 6a6205dc9fba4a938c71189d0ad6d2bd
item_updated_time: 1764345626329
title_diff: "[{\"diffs\":[[1,\"如何从终端重启 Linux 系统，这 6 个命令一定要手到擒来！\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":32}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>如何从终端重启 Linux 系统，这 6 个命令一定要手到擒来！</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"39418\\\"></a>\\\r\\\n<h1>如何从终端重启 Linux 系统，这 6 个命令一定要手到擒来！</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"margin:0px;\\\"><div style=\\\"padding:8px 0px;margin:8px auto;max-width:700px;\\\"> <div><span></span></div>\\\n<p></p>\\\n<div style=\\\"--en-blockquote:true;box-sizing: border-box; padding-left: 19px; padding-top: 6px; padding-bottom: 6px; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial; margin-top: 6px\\\"><div>原文链接: <a href=\\\"http://mp.weixin.qq.com/s?__biz=MzIxMTA2ODE1OQ==&amp;mid=2651161954&amp;idx=1&amp;sn=cf5026f62915eacd2c19a956d776d979&amp;chksm=8d6c9682235267f17b3ff8cd7fad84a9994a26481607e596c3cd1d398c8091d15644832f0634&amp;mpshare=1&amp;scene=1&amp;srcid=0406S2iMVWsDE0D03eTo058F&amp;sharer_shareinfo=3004ba48f67c74ac6720ff44a62fdfcc&amp;sharer_shareinfo_first=3004ba48f67c74ac6720ff44a62fdfcc#rd\\\"><span>http://mp.weixin.qq.com/s?__biz=MzIxMTA2ODE1OQ==&amp;mid=2651161...</span></a></div></div>\\\n<p></p>\\\n<div><span></span></div>\\\n<div style=\\\"\\\"><div><div><h1 style=\\\"margin:0\\\"> 如何从终端重启 Linux 系统，这 6 个命令一定要手到擒来！ </h1><div><span style=\\\"position:relative\\\">原创</span><span> 漫谈君 </span><span><a style=\\\"position:relative\\\"> 运维漫谈 </a></span><span><em></em></span></div><div style=\\\";\\\"><p style=\\\"margin:0;margin-bottom:0;max-width:100%;white-space:normal;overflow-wrap:break-word !important;box-sizing:border-box !important\\\"><span><img src=\\\":/cfe1a845de4a473698d3a08eb050bbf5\\\" type=\\\"image/gif\\\" data-filename=\\\"640.gif\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;overflow-wrap: break-word !important;\\\"/></span></p><div style=\\\"margin-bottom: 0px;\\\"><div><span><br/></span></div><div style=\\\"font-size: 16px;color: black;padding: 0;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;word-wrap: break-word;text-align: left;font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', 'WenQuanYi Micro Hei', 'Microsoft JhengHei', system-ui, sans-serif, Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;text-rendering: optimizeLegibility;line-height: 1.75;\\\"><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>在动鼠标就能搞定的年代，为什么还要敲命令重启系统？答案很简单：终端是Linux的灵魂所在。它能让你在系统挂掉、远程登录或者需要批量操作时，依然保持对系统的掌控。更别提有些命令还能让你延迟重启、发送警告，甚至切换系统状态——这些都是图形界面望尘莫及的。</span></p><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>想象一下，你在管理一台远程服务器，突然需要重启系统。如果只会点“重启”按钮，那你可能连服务器的IP都摸不着。而学会这6个命令，你就能在终端里翻云覆雨，轻松应对各种场景。</span></p><div style=\\\"margin: 10px 8px;display: flex;flex-direction: column;justify-content: center;align-items: center;\\\"><span><img src=\\\":/ebb3e392ff3f44e391562bf6f6c2a583\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;max-width: 100%;display: block;margin: 0.1em auto 0px;border-radius: 4px;width: 100% !important;\\\"/></span></div><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>命令1：</span><code><span>reboot</span></code><span> - 最直接的重启小能手</span></span><span></span></h2><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span> 是Linux里最简单粗暴的重启命令。就像它的名字一样，它的任务就是让系统立刻重启，没有太多花哨的选项，适合追求效率的场景。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>怎么用？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>最基本的用法就是直接敲：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>reboot</span></div></pre></div><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>回车后，系统会马上重启，干净利落。如果你想在重启前提醒其他在线用户，可以搭配 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>wall</span></code><span> 命令广播一条消息：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>wall &quot;系统马上要重启啦，大家保存好手头工作！&quot;</span><div><span>reboot</span></div></div></pre></div><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>小贴士</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>权限问题</span></strong><span>：普通用户运行 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span> 会提示权限不足，得加上 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>sudo</span></code><span>：</span></div></li></ul><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>sudo reboot</span></div></pre></div><div style=\\\"margin: 10px 8px;display: flex;flex-direction: column;justify-content: center;align-items: center;\\\"><span><img src=\\\":/cc723c6317d24248a39e397a2b31f788\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;max-width: 100%;display: block;margin: 0.1em auto 0px;border-radius: 4px;width: 100% !important;\\\"/></span></div><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>执行速度</span></strong><span>：大多数系统中，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span> 会迅速生效，但具体时间可能因系统配置略有不同。</span></p></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>适用场景</span></strong><span>：当你需要快速重启，又不需要复杂操作时，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span> 是你的最佳拍档。</span></p></div></li></ul><hr style=\\\"margin-top: 10px;margin-bottom: 10px;border: none;border-top: 1px solid black;border-style: solid;border-width: 2px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;\\\"/><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>命令2：</span><code><span>shutdown</span></code><span> - 全能型选手，功能超丰富</span></span><span></span></h2><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown</span></code><span> 是个多面手，不仅能重启，还能关机，甚至取消操作。它最大的特点是灵活——你可以设定重启时间，还能给所有登录用户发个“友情提示”。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>怎么用？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>想立刻重启系统？试试这个：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>shutdown -r now</span></div></pre></div><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>-r</span></code><span> 表示“reboot”（重启）。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>now</span></code><span> 表示“现在就干”。</span></div></li></ul><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>如果想10分钟后重启，并且提醒大家：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>shutdown -r +10 &quot;系统将在10分钟后重启，进行维护升级，请保存工作！&quot;</span></div></pre></div><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>+10</span></code><span> 是延迟10分钟。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><span>后面的文字是广播给用户的消息。</span></div></li></ul><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>其他玩法：</span></p><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>关机</span></strong><span>：用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>-h</span></code><span> 代替 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>-r</span></code><span>，比如 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown -h now</span></code><span>。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>取消操作</span></strong><span>：如果手滑敲错了，用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown -c</span></code><span> 取消。</span></div></li></ul><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>小贴士</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>权限要求</span></strong><span>：和 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span> 一样，需要 root 权限。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>默认行为</span></strong><span>：如果你只写 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown -r</span></code><span>，没加时间，默认是1分钟后重启，还会自动发警告。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>适用场景</span></strong><span>：适合需要计划重启或多人共用系统的环境，比如服务器维护。</span></div></li></ul><hr style=\\\"margin-top: 10px;margin-bottom: 10px;border: none;border-top: 1px solid black;border-style: solid;border-width: 2px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;\\\"/><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>命令3：</span><code><span>init</span></code><span> - 运行级别的“老司机”</span></span><span></span></h2><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>init</span></code><span> 是Linux里控制系统运行级别的经典命令。Linux有0到6共7个运行级别，而级别6正好代表重启。听起来有点“硬核”，但用起来很简单。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>怎么用？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>重启系统就一句话：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>init 6</span></div></pre></div><div style=\\\"margin: 10px 8px;display: flex;flex-direction: column;justify-content: center;align-items: center;\\\"><span><img src=\\\":/064bde5562cc4b71b22da1554b088d09\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;max-width: 100%;display: block;margin: 0.1em auto 0px;border-radius: 4px;width: 100% !important;\\\"/></span></div><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>运行级别速览</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>Linux的运行级别是个很有意思的概念，简单列一下：</span></p><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>0</span></strong><span>：关机</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>1</span></strong><span>：单用户模式（维修用）</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>2</span></strong><span>：多用户模式，无网络</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>3</span></strong><span>：多用户模式，有网络</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>4</span></strong><span>：未使用</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>5</span></strong><span>：图形界面模式</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>6</span></strong><span>：重启</span></div></li></ul><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>小贴士</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>无警告</span></strong><span>：</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>init 6</span></code><span> 直接动手，不会提前通知用户。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>权限</span></strong><span>：需要 root 或 sudo。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>现代趋势</span></strong><span>：在新版Linux里（如用systemd的系统），</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>init</span></code><span> 逐渐被 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>systemctl</span></code><span> 取代，但依然好用。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>适用场景</span></strong><span>：如果你熟悉运行级别，或者用的是老系统，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>init</span></code><span> 是你的好帮手。</span></div></li></ul><hr style=\\\"margin-top: 10px;margin-bottom: 10px;border: none;border-top: 1px solid black;border-style: solid;border-width: 2px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;\\\"/><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>命令4：</span><code><span>systemctl</span></code><span> - 现代Linux的“新宠儿”</span></span><span></span></h2><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>systemctl</span></code><span> 是systemd的命令行工具，systemd是现代Linux的主流初始化系统。它不仅能重启，还能管理服务、查看状态，功能强大到不行。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>怎么用？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>重启系统：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>systemctl reboot</span></div></pre></div><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>其他用法：</span></p><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>关机</span></strong><span>：</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>systemctl poweroff</span></code></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>挂起</span></strong><span>：</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>systemctl suspend</span></code></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>休眠</span></strong><span>：</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>systemctl hibernate</span></code></div></li></ul><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>小贴士</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>权限</span></strong><span>：需要 root 或 sudo。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>兼容性</span></strong><span>：只在支持systemd的系统上有效，老系统可能不支持。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>适用场景</span></strong><span>：如果你用的是Ubuntu 16.04、CentOS 7或更新的发行版，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>systemctl</span></code><span> 是标配。</span></div></li></ul><hr style=\\\"margin-top: 10px;margin-bottom: 10px;border: none;border-top: 1px solid black;border-style: solid;border-width: 2px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;\\\"/><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>命令5：</span><code><span>halt</span></code><span> - 低调的“停止者”</span></span><span></span></h2><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>halt</span></code><span> 的意思是“停止”，它会让系统停下来，但不一定断电。它的作用有点像按下暂停键，具体效果取决于系统配置。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>怎么用？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>直接运行：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>halt</span></div></pre></div><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>和其他命令的区别</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>无脚本</span></strong><span>：不像 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown</span></code><span>，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>halt</span></code><span> 不会运行关机脚本。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>不断电</span></strong><span>：在一些系统上，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>halt</span></code><span> 只是停掉CPU，你得手动关电源。</span></div></li></ul><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>小贴士</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>权限</span></strong><span>：需要 root。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>风险</span></strong><span>：因为不执行关机脚本，可能导致数据丢失，不建议随便用。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>适用场景</span></strong><span>：特殊需求时用，比如调试硬件。</span></div></li></ul><hr style=\\\"margin-top: 10px;margin-bottom: 10px;border: none;border-top: 1px solid black;border-style: solid;border-width: 2px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;\\\"/><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>命令6：</span><code><span>poweroff</span></code><span> - 安全关机的“终结者”</span></span><span></span></h2><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>poweroff</span></code><span> 是关机并断电的命令，和 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown -h</span></code><span> 很像，但更直接。它会安全关闭系统，确保所有服务都停妥。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>怎么用？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>简单粗暴：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>poweroff</span></div></pre></div><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>和 </span><code><span>halt</span></code><span> 的区别</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>安全关机</span></strong><span>：</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>poweroff</span></code><span> 会运行关机脚本，断电前保护数据。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>用户友好</span></strong><span>：比 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>halt</span></code><span> 更适合日常使用。</span></div></li></ul><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>小贴士</span></span></h3><ul style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>权限</span></strong><span>：需要 root。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>适用场景</span></strong><span>：需要彻底关闭系统时，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>poweroff</span></code><span> 是靠谱选择。</span></div></li></ul><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>命令大比拼：谁更适合你？</span></span><span></span></h2><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>为了方便选择，我把这6个命令的主要特点整理成一张表：</span></p><div style=\\\"margin: 10px 8px;display: flex;flex-direction: column;justify-content: center;align-items: center;\\\"><span><img src=\\\":/48bc77a3e68d4964836b4ebccb250e15\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;max-width: 100%;display: block;margin: 0.1em auto 0px;border-radius: 4px;width: 100% !important;\\\"/></span></div><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>实战场景：这些命令怎么用？</span></span><span></span></h2><ol style=\\\"margin:0;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:decimal\\\"><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>急着重启</span></strong><span>：系统卡了，想立刻重启？敲 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span> 或 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>systemctl reboot</span></code><span>，秒速搞定。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>计划维护</span></strong><span>：明天凌晨2点重启服务器？用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown -r 02:00 &quot;凌晨维护，重启系统&quot;</span></code><span>。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>远程操作</span></strong><span>：SSH连着服务器，怕影响别人？用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown -r +5</span></code><span> 发个警告。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>系统调试</span></strong><span>：想切换到单用户模式修东西？先 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>init 1</span></code><span>，修好后再 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>init 6</span></code><span>。</span></div></li><li><div style=\\\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);\\\"><strong style=\\\"color: #009874;font-weight: bold;\\\"><span>彻底关机</span></strong><span>：机器要休息了？用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>poweroff</span></code><span> 安全关闭。</span></div></li></ol><h2 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;font-size:20.8px;display:table;padding:0.3em 1em;margin:4em auto 2em;color:#fff;background:#009874;font-weight:bold;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1)\\\"><span><span>你可能遇到的问题</span></span><span></span></h2><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>Q1：怎么在重启前确保数据不丢？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>Linux会自动保存系统状态，但用户自己的文件得手动保存。可以用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown</span></code><span> 发警告，提醒大家存档。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>Q2：手滑敲了 </span><code><span>shutdown</span></code><span>，怎么办？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>别慌，赶紧敲 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown -c</span></code><span>，就能取消。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>Q3：没 root 权限也能重启吗？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>一般不行，但如果有 sudo 权限，可以加 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>sudo</span></code><span>，比如 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>sudo reboot</span></code><span>。</span></p><h3 style=\\\"margin-top:30px;margin-bottom:15px;text-align:center;line-height:1.2;font-size:17.6px;display:table;padding:4px 8px;border-bottom:4px solid #009874;border-radius:4px;margin:2em auto 1em;color:hsl(0 0 3.9%);font-weight:bold\\\"><span><span>Q4：</span><code><span>reboot</span></code><span> 和 </span><code><span>init 6</span></code><span> 有什么不一样？</span></span></h3><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>效果差不多，但 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span> 是专门的重启命令，</span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>init 6</span></code><span> 是通过运行级别实现的，原理不同。</span></p><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>学会这6个命令，你就等于拿到了Linux系统的“遥控器”。无论是快速重启、延迟操作，还是安全关机，它们都能让你得心应手。Linux终端的魅力就在于此——简单几行命令，就能掌控全局。</span></p><p style=\\\"font-size:16px;padding-top:8px;padding-bottom:8px;margin:0;line-height:26px;color:black\\\"><span>别光看，动手试试吧！打开终端，敲敲 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>reboot</span></code><span>，感受一下系统重启的快感。或者用 </span><code style=\\\"word-wrap: break-word;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;font-size: 90%;color: #d14;background: rgba(27,31,35,.05);padding: 3px 5px;border-radius: 4px;\\\"><span>shutdown</span></code><span> 玩点花样，给自己定个5分钟后的重启计划。这些命令不只是工具，更是你在Linux世界里闯荡的底气！</span></p></div><p style=\\\"margin:0;text-align:center\\\"><span><img src=\\\":/20cd9c377c6d441d89239ea1a32b8604\\\" type=\\\"image/gif\\\" data-filename=\\\"640.gif\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;\\\"/></span></p><div style=\\\"-webkit-tap-highlight-color: transparent;margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;font-family: 微软雅黑;font-size: 16px;widows: 1;word-spacing: 2px;caret-color: rgb(51, 51, 51);text-wrap: wrap;background-color: rgb(255, 255, 255);font-variant-numeric: normal;font-variant-east-asian: normal;color: rgb(127, 127, 127);letter-spacing: 0.54px;text-align: center;\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;font-size: 18px;\\\"><strong style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(0, 128, 255);\\\"></span></strong></span></div><div style=\\\"-webkit-tap-highlight-color: transparent;margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;font-family: 微软雅黑;font-size: 16px;widows: 1;word-spacing: 2px;caret-color: rgb(51, 51, 51);text-wrap: wrap;background-color: rgb(255, 255, 255);font-variant-numeric: normal;font-variant-east-asian: normal;color: rgb(127, 127, 127);letter-spacing: 0.54px;text-align: center;\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;font-size: 18px;color: rgb(61, 170, 214);\\\"><strong style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;\\\"><span>大事！运维漫谈-技术交流群对外开放！</span></strong></span></div><div style=\\\"-webkit-tap-highlight-color: transparent;margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;font-family: 微软雅黑;font-size: 16px;widows: 1;word-spacing: 2px;caret-color: rgb(51, 51, 51);text-wrap: wrap;background-color: rgb(255, 255, 255);font-variant-numeric: normal;font-variant-east-asian: normal;color: rgb(127, 127, 127);letter-spacing: 0.54px;text-align: center;\\\"><span><br/></span></div><div style=\\\"-webkit-tap-highlight-color: transparent;margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;font-family: 微软雅黑;font-size: 16px;text-align: center;widows: 1;word-spacing: 2px;caret-color: rgb(51, 51, 51);text-wrap: wrap;background-color: rgb(255, 255, 255);font-variant-numeric: normal;font-variant-east-asian: normal;color: rgb(127, 127, 127);letter-spacing: 0.54px;\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(0, 0, 0);font-size: 15px;\\\"><span>扫码可添加小编微信，</span><strong style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;\\\"><span>申请进</span></strong></span><span style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(0, 0, 0);font-size: 15px;\\\"><strong style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;\\\"><span>群</span></strong></span></div><div style=\\\"-webkit-tap-highlight-color: transparent;margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;font-family: 微软雅黑;font-size: 16px;text-align: start;widows: 1;word-spacing: 2px;caret-color: rgb(51, 51, 51);text-wrap: wrap;background-color: rgb(255, 255, 255);font-variant-numeric: normal;font-variant-east-asian: normal;color: rgb(127, 127, 127);letter-spacing: 0.54px;\\\"><span><br/></span></div><div style=\\\"-webkit-tap-highlight-color: transparent;margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;font-family: 微软雅黑;font-size: 16px;widows: 1;word-spacing: 2px;caret-color: rgb(51, 51, 51);text-wrap: wrap;background-color: rgb(255, 255, 255);font-variant-numeric: normal;font-variant-east-asian: normal;color: rgb(127, 127, 127);letter-spacing: 0.54px;text-align: center;\\\"><span><img src=\\\":/6ae97372764f4ba99344bcc61d8bb201\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;-webkit-tap-highlight-color: transparent;outline: 0px;width: 158px;__visibility: visible !important;height: 158px;\\\"/></span></div><div style=\\\"-webkit-tap-highlight-color: transparent;margin-right: 16px;margin-bottom: 0px;margin-left: 16px;outline: 0px;font-family: 微软雅黑;font-size: 16px;widows: 1;word-spacing: 2px;caret-color: rgb(51, 51, 51);text-wrap: wrap;background-color: rgb(255, 255, 255);font-variant-numeric: normal;font-variant-east-asian: normal;color: rgb(127, 127, 127);letter-spacing: 0.54px;text-align: center;\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(136, 136, 136);font-size: 12px;\\\"><span>▲长按加群</span></span></div><div><span></span></div><p style=\\\"margin:0;margin-top:0.8em;margin-bottom:0.8em;padding-top:8px;padding-bottom:8px;max-width:100%;line-height:1.75;overflow-wrap:break-word !important;box-sizing:border-box !important\\\"><span><br/></span></p></div><p style=\\\"margin:0;margin-bottom:0;max-width:100%;white-space:normal;overflow-wrap:break-word !important;box-sizing:border-box !important\\\"><span><img src=\\\":/8626c36d19244cfab01f2aed80a7903c\\\" type=\\\"image/gif\\\" data-filename=\\\"640.gif\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;overflow-wrap: break-word !important;\\\"/></span></p><div><span><br/></span></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":55971}]"
metadata_diff: {"new":{"id":"6a6205dc9fba4a938c71189d0ad6d2bd","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348846227,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:14.153Z
created_time: 2025-11-28T21:04:14.153Z
type_: 13