在 CentOS 系统中,常用的重启命令及用法如下:
reboot 命令bash
sudo reboot-f:强制立即重启(不推荐,可能损坏数据)。-w:模拟重启(只写日志,不实际重启)。shutdown 命令bash
sudo shutdown -r nowbash
sudo shutdown -r +5bash
sudo shutdown -cinit 命令bash
sudo init 66 是系统运行级别,代表重启。systemctl 命令(推荐)bash
sudo systemctl rebootbash
sudo systemctl reboot --time=10:00Alt + SysRq(或 Print Screen)。r e i s u b(每个字母间隔 1-2 秒)。sudo 提权。screen 或 tmux 执行,避免连接中断导致命令未执行。根据系统版本(CentOS 6/7/8)选择合适命令,推荐优先使用 systemctl(CentOS 7+)或 shutdown。