Skip to main content

Command referenceshutdown

shutdown command (Windows / CMD)

WindowsCMDsystembeginner

What it does

Shut down, restart, sign out, or schedule power actions. Searches for the shutdown command cmd windows usually need CMD syntax, practical switches, and notes on how it compares with PowerShell or Linux alternatives. This page covers syntax, common options, and copyable examples for Command Prompt.

Shut down, restart, sign out, or schedule power actions.

Syntax

shutdown [/i | /l | /s | /sg | /r | /g | /a] [/t xxx] [/f] [/m \\computer]

Common options

Flag / optionMeaning
/sShut down the computer.
/rRestart after shutdown.
/t secondsSet the delay up to the supported limit.
/aAbort a pending shutdown.
/fForce applications to close.

Practical examples

Restart now

shutdown /r /t 0

Restarts immediately.

Schedule shutdown

shutdown /s /t 600

Schedules shutdown in ten minutes.

Cancel action

shutdown /a

Aborts a pending timed shutdown.

Common mistakes

  • Using `/f` and causing unsaved application data to be lost.
  • Specifying seconds while thinking the timeout is measured in minutes.

FAQ

What does shutdown do in Command Prompt?

Shut down, restart, sign out, or schedule power actions.

How do I run shutdown in CMD?

Open Command Prompt and follow `shutdown [/i | /l | /s | /sg | /r | /g | /a] [/t xxx] [/f] [/m \\computer]`; quote paths containing spaces.

What is a practical shutdown example in CMD?

Try `shutdown /r /t 0` — Restarts immediately.

Can shutdown be used in a batch file?

Yes. Check its exit code and escape CMD metacharacters when input is variable.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.