CentOS 关机命令为 shutdown,语法为 shutdown [选项] 时间 [信息]。选项包括:-h 立即停止系统;-P 关机后关电源;-r 重新启动;-t 等待时间。时间可指定为立即 (now)、分钟数 (+minutes) 或特定时间 (hh:mm)。可添加信息在系统消息中显示。

CentOS 关机命令行
在 CentOS 系统中,使用 shutdown 命令可以关机。下面是其语法:
<code class="bash">shutdown [选项] 时间 [信息]</code>
选项:
| 选项 | 描述 |
|---|---|
-h |
立即将系统停止到运行级别 halt。 |
-P |
关机后关电源(仅当系统支持时)。 |
-r |
重新启动系统。 |
-t |
指定在关机前等待的时间(以秒为单位)。 |
时间:
可以使用以下格式指定时间:
+5 表示在 5 分钟后关机)。13:30 表示下午 1:30 关机)。信息:
该参数用于在系统消息中显示的信息。
示例:
<code class="bash">shutdown now</code>
<code class="bash">shutdown +5</code>
<code class="bash">shutdown -r 13:30</code>
<code class="bash">shutdown -P now</code>
<code class="bash">shutdown -h now "Maintenance in progress"</code>
以上就是centos关机命令行的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号