reboot 可重启 关闭 停止计算机。 reboot 和 halt 命令用法基本相同。
Linux 系统后台通常运行着许多进程, 强制直接关闭计算机电源可能导致进程数据丢失, 使系统处于不稳定状态 (甚至损坏硬件设备)。
另请参阅: halt init poweroff shutdown
reboot --reboot
基本语法
reboot [OPTIONS...]
OPTIONS 选项
| 参数 | EN 解释 | 中文翻译 | Remark |
|---|---|---|---|
| --help | Show this help | 展示相关帮助信息 | |
| --halt | Halt the machine | 停止机器 | |
| -p --poweroff | Switch off the machine | 关闭机器 | |
| --reboot | Reboot the machine | 重新启动机器 | |
| -f --force | Force immediate halt/power-off/reboot | 强制立即停止/关机/重启 | |
| -w --wtmp-only | Don't halt/power-off/reboot, just write wtmp record | 不要停止/关机/重启,只写 wtmp 记录 | |
| -d --no-wtmp | Don't write wtmp record | 不要写 wtmp 记录 | |
| --no-wall | Don't send wall message before halt/power-off/reboot | 在停止/关机/重启前,不发送墙消息 |
| Function | 命令 | 文字解释 | 示例 | 示例解释 |
|---|---|---|---|---|
| 帮助 | reboot --help | 展示帮助信息 | ||
| 停止 | reboot --halt | 保持电源仅停止计算机 | ||
| 重启 | reboot --reboot | 重启计算机 |
Copyright Notice: This article is an exclusive original manuscript, copyright belongs to Happy Digits Software , shall not be reproduced without permission.