Command referenceshutdown
shutdown command (Windows / CMD)
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 / option | Meaning |
|---|---|
| /s | Shut down the computer. |
| /r | Restart after shutdown. |
| /t seconds | Set the delay up to the supported limit. |
| /a | Abort a pending shutdown. |
| /f | Force 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.
Related commands
- systeminfoDisplay detailed operating system, hardware, boot, memory, and update information.
- sfcVerify protected Windows system files and repair supported corruption.
- systemctlControl and inspect services and other systemd units.
- Get-ServiceRetrieve service controller objects and current service states.
- exportMark shell variables for inheritance by child processes.
- setDisplay, create, or remove CMD environment variables.
- dateDisplay or format the system date and time.
- journalctlQuery and follow logs stored by the systemd journal.
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.