Back to the command reference

shutdown

SystemFundamentals In real Linux

Power off or reboot the machine

Name: shutdown

This command needs a real Linux system; you can practise it in real Linux mode.

Full man page

Description

shutdown powers off or reboots safely: it warns logged-in users, stops services and unmounts file systems. It can act now or at a scheduled time; cancel a scheduled shutdown with shutdown -c.

Syntax

shutdown [OPTION] [TIME] [MESSAGE]

Common options

now / +10 / 22:00Now / in 10 minutes / at a time
-hPower off
-rReboot
-cCancel a scheduled shutdown
-kOnly warn the logged-in users; do not shut down

Examples

  • $ sudo shutdown -h now

    Power off now

    Explain
  • $ sudo shutdown -r +5 "Updating"

    Reboot in 5 minutes with a message

    Explain

Related