Linux command
shutdown 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Power off
shutdown -h now
Reboot
shutdown -r now
Reboot
shutdown -r +5 &
Shutdown
shutdown -h 13:00
Cancel
shutdown -c
说明
shutdown brings the system down in a safe way. All logged-in users are notified, new logins are blocked, and running processes are signaled to terminate gracefully. The time argument specifies when to shut down: now for immediate, +m for minutes from now, or hh:mm for a specific time. An optional message can be broadcast to all users.
参数
- -h, --halt
- Halt the system after shutdown
- -P, --poweroff
- Power off the system (default with -h)
- -r, --reboot
- Reboot the system
- -c
- Cancel a pending shutdown
- -k
- Send warning message but don't actually shutdown
- now
- Execute immediately
- +_m_
- Execute in m minutes
- _hh:mm_
- Execute at specified time (24-hour format)
FAQ
What is the shutdown command used for?
shutdown brings the system down in a safe way. All logged-in users are notified, new logins are blocked, and running processes are signaled to terminate gracefully. The time argument specifies when to shut down: now for immediate, +m for minutes from now, or hh:mm for a specific time. An optional message can be broadcast to all users.
How do I run a basic shutdown example?
Run `shutdown -h now` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -h, --halt do in shutdown?
Halt the system after shutdown