Plan and run timed halts and reboots from the command line with practical examples and safety tips. 16.11.2025 | reading time: 3 min When a server, lab or workstation needs to stop at a predictable time, a controlled shutdown avoids surprises and data loss; this short guide shows how to schedule shutdowns from the command line and how to cancel or automate them safely. A concrete case A small testlab must be powered off in 30 minutes for maintenance; as root he runs a timed halt and watches the system announce it to logged users: ```\nsudo shutdown -h +30 "Maintenance in 30 minutes"\n# Example output (announced to users):\nBroadcast message from root@host\nThe system is going down for halt in 30 minutes!\n```\nTo cancel the pending shutdown: `sudo shutdown -c` which will broadcast that the shutdown was cancelled. Schedule at a fixed time You can name a clock time instead of a delta, for example `sudo shutdown -h 23:00` to halt at 23:00, or let `at` run the shutdown command for single-use scheduling by piping the command into `at 23:00` so it runs as a job at the specified hour. Options and behaviors to know Only root can schedule system-wide shutdowns; `shutdown` by default broadcasts a warning to all users and processes, `-h` halts and `-P` powers off, `-r` reboots, and `-c` cancels; systemd-based systems map these to `systemctl` actions so scripts should consider `systemctl poweroff` and `systemd-run` for transient timers and finer control. Automation and remote control For mass operations he scripts a safe sequence: notify users, sync filesystems, then run the shutdown; for many machines use SSH loops or configuration tools, and for recurring schedules prefer `cron` or systemd timers rather than ad-hoc `at` jobs to keep things auditable and reproducible. Wrap-up and next steps Scheduling shutdowns is a small but critical skill: practice on a VM, test broadcasts and cancellations, and prefer safe automation for production; to deepen system knowledge consider formal certification and intensive exam prep at bitsandbytes.academy which helps prepare for CompTIA Linux+ or LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. utilities processes scripting boot-process