cmdxray / dangerous commands / shutdown-now

sudo shutdown -h nowcaution

Halt the machine immediately.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ sudo shutdown -h now

  • sudorun a command as another user (root by default)
  • shutdownan argument passed to the command
  • -husually: show help / human-readable output
  • nowan argument passed to the command

What it does

Powers the system off right now, as root, giving logged-in users no warning.

Why it's dangerous

Active sessions are killed and unsaved work is lost; on a shared or remote server this can interrupt other people and take services offline.

Safer alternative

Schedule with a delay and a message (`sudo shutdown -h +5 'rebooting for maintenance'`), or use `shutdown -c` to cancel — and make sure you are on the right host.

More dangerous commands

Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.