What is the Linux shutdown command?

The shutdown command is a built-in Linux utility used to power off, halt, or reboot a system in a controlled way. Unlike pulling the plug, it gracefully stops services, flushes pending writes to disk, and notifies logged-in users before the machine goes down. This prevents data loss, file system corruption, and interrupted background jobs.

The command schedules the action for a specific time (immediately, after a number of minutes, or at an exact clock time) and optionally broadcasts a wall message to all logged-in users so they can save their work. Because it changes the system state, it normally requires root privileges and is invoked with sudo on most distributions.

Tool description

This tool generates ready-to-paste shutdown commands for Linux systems based on the options you select. Pick the action (power off, halt, reboot, or cancel), choose when it should run, optionally include a warning message, and the correct command appears instantly.

Examples

Scenario Generated command
Power off immediately sudo shutdown -P now
Reboot in 5 minutes sudo shutdown -r +5
Power off at 23:00 with a message sudo shutdown -P 23:00 "Server maintenance tonight"
Send only a warning, no shutdown sudo shutdown -P -k +10 "Reboot in 10 minutes"
Cancel a pending shutdown sudo shutdown -c

Features

  • Supports power off, halt, reboot, and cancel actions
  • Three time modes: immediate, delay in minutes, or exact clock time (HH:MM)
  • Optional wall message broadcast to logged-in users
  • Toggle for sudo, warning-only mode (-k), and disabling the wall broadcast (--no-wall)
  • Live command preview that updates as you change options

Use cases

  • System administrators scheduling maintenance reboots on production servers
  • Developers writing cron jobs or automation scripts that need a correct shutdown syntax
  • Users who only occasionally manage Linux machines and want to avoid memorizing flags

Options explained

  • Action — Selects the operation: -P (power off), -H (halt without powering off), -r (reboot), or -c (cancel a previously scheduled shutdown).
  • Time modenow runs immediately, minutes delays by +N minutes, and at time schedules for a specific HH:MM clock time.
  • Wall message — Text broadcast to all logged-in terminals warning them of the upcoming action.
  • Use sudo — Prepends sudo since shutdown requires root privileges on most systems.
  • Warning only (-k) — Sends the wall message and schedules nothing; useful to test notifications.
  • No wall (--no-wall) — Suppresses the broadcast message to other users.

Tips

  • Use +0 or now for an immediate shutdown; both are accepted by the shutdown binary.
  • If a scheduled shutdown is already pending, run the cancel action (shutdown -c) before scheduling a new one.
  • On systemd-based distributions, shutdown is a symlink to systemctl, so the same command works on Ubuntu, Debian, Fedora, Arch, and most modern Linux systems.