在 CentOS Minimal(最小化安装)里,重启系统和普通 CentOS 是一样的,常用方法如下:
reboot(最常用)reboot
或
sudo reboot
shutdown 命令立即重启:
shutdown -r now
init / telinitinit 6
或
telinit 6
systemctl(systemd 系统)systemctl reboot
建议用:
sudo shutdown -r now
避免直接断电导致文件系统问题。
sudo如果你是在 VMware / VirtualBox / 云服务器 上运行,也可以告诉我具体环境,我可以给你更精准的建议。