温馨提示×

centos stream8怎么关机

小樊
43
2026-10-05 20:36:18
栏目: 智能运维

在 CentOS Stream 8 中,关机常用以下几种方式(需要 root 权限或使用 sudo):

1. 使用 shutdown 命令(推荐)

shutdown -h now

或延时关机(如 5 分钟后):

shutdown -h +5

2. 使用 poweroff 命令

poweroff

3. 使用 halt 命令

halt

(halt 后会停止系统,但不一定断电,现代系统通常等同于关机)

4. 使用 systemctl(systemd 系统)

systemctl poweroff

或

systemctl halt

5. 如果是图形界面

可以直接在桌面环境中点击 电源 → 关机。

⚠️ 注意:普通用户执行关机命令一般需要加 sudo,例如:

sudo shutdown -h now

如果你是在 虚拟机 / 云服务器 上操作,也可以通过平台控制台进行关机。

0 踩