Files
uTools-Manuals/docs/linux/halt.html
T
fofolee 38dcd51d8a v0.0.2
2019-04-21 11:50:48 +08:00

18 lines
1.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<h1 id="halt">halt</h1>
<p>关闭正在运行的Linux操作系统</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>halt命令</strong> 用来关闭正在运行的Linux操作系统。halt命令会先检测系统的runlevel,若runlevel为0或6,则关闭系统,否则即调用shutdown来关闭系统。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">halt(选项)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-d:不要在wtmp中记录;
-f:不论目前的runlevel为何,不调用shutdown即强制关闭系统;
-i:在halt之前,关闭全部的网络界面;
-nhalt前,不用先执行sync
-phalt之后,执行poweroff
-w:仅在wtmp中记录,而不实际结束系统。</code></pre>
<h3 id="实例">实例</h3>
<pre><code class="language-bash">halt -p //关闭系统后关闭电源。
halt -d //关闭系统,但不留下纪录。</code></pre>
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->