What is CMD shutdown command

The shutdown command in Windows Command Prompt (CMD) is used to shut down, restart, or log off the computer. Here are some common uses:

Basic Commands:

  • Shut down the computer: shutdown /s
  • Restart the computer: shutdown /r
  • Log off the current user: shutdown /l

Delayed Shutdown/Restart:

You can schedule a shutdown or restart with a delay by adding the /t parameter followed by the number of seconds. For example:

  • Shut down after 1 minute: shutdown /s /t 60
  • Restart after 5 minutes: shutdown /r /t 300

Additional Options:

  • Hibernate the computer: shutdown /h
  • Force close all applications: shutdown /f
  • Display a message before shutting down: shutdown /c "Your message here"

To see a full list of options, you can type shutdown /? in the Command Prompt.