Linux command
poweroff 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Power off
poweroff
Halt
poweroff --halt
Reboot
poweroff --reboot
Example
poweroff -f
Example
poweroff -w
说明
poweroff shuts down the system and turns off power. On systems with ACPI or APM support, it signals hardware to cut power after shutdown completes. The command is typically a symlink to systemctl or the init system's shutdown mechanism. It ensures clean system shutdown with proper service termination.
参数
- -f, --force
- Force immediate shutdown without system manager
- -w, --wtmp-only
- Write wtmp record without actual shutdown
- --halt
- Halt instead of power off
- --reboot
- Reboot instead of power off
- -n, --no-wtmp
- Don't write wtmp record
FAQ
What is the poweroff command used for?
poweroff shuts down the system and turns off power. On systems with ACPI or APM support, it signals hardware to cut power after shutdown completes. The command is typically a symlink to systemctl or the init system's shutdown mechanism. It ensures clean system shutdown with proper service termination.
How do I run a basic poweroff example?
Run `poweroff` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --force do in poweroff?
Force immediate shutdown without system manager