← 返回命令列表

Linux command

systemctl-halt 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Halt

systemctl halt

Force

systemctl halt -f

Example

systemctl halt -f --no-wall

Emergency

systemctl halt -ff

Schedule

systemctl halt --when 23:00

Example

systemctl halt --when +2h

Cancel

systemctl halt --when cancel

说明

systemctl halt shuts down and halts the system, stopping the OS kernel but leaving hardware powered on. This differs from poweroff, which completely powers down the machine, and reboot, which restarts the system. With one `--force`, services are not gracefully stopped. With two `--force` flags, filesystems are not unmounted and may cause data loss.

参数

-f, --force
Skip graceful service shutdown
--force --force (-ff)
Immediate halt without cleanup (dangerous)
--no-wall
Don't send wall message to users
--when _TIME_
Schedule halt at specific time or offset

FAQ

What is the systemctl-halt command used for?

systemctl halt shuts down and halts the system, stopping the OS kernel but leaving hardware powered on. This differs from poweroff, which completely powers down the machine, and reboot, which restarts the system. With one `--force`, services are not gracefully stopped. With two `--force` flags, filesystems are not unmounted and may cause data loss.

How do I run a basic systemctl-halt example?

Run `systemctl halt` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --force do in systemctl-halt?

Skip graceful service shutdown