This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.
This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 310,257 times.
Learn more...
This wikiHow guide teaches you how to restart a Windows PC by typing commands at the command prompt. We'll show you the most useful versions of the restart command (shutdown /r), plus how to cancel a reboot if you change your mind.
Restart Commands for CMD (Command Prompt)
- shutdown /r - Closes programs and reboots in 60 seconds.
- shutdown /r /t <seconds> - Reboots in the preferred number of seconds.
- shutdown /r /t 0 - Reboot immediately (no warning).
- shutdown /r /g - Reboot now, then reopen startup applications.
- shutdown /r /m \\<computerName> - Reboot remote PC in 60 seconds.
- shutdown /a - Cancel the reboot.
Steps
Rebooting from Command Prompt
-
Press ⊞ Win+S. This activates the Windows search bar.
-
Type cmd. A list of search results will appear.Advertisement
-
Right-click Command Prompt and select Run as administrator. This opens the command prompt with administrator permissions. The command prompt will appear inside a terminal window.
- If prompted, click Yes to confirm.
- If you can't use the search bar to open Command Prompt (for example, if the taskbar has disappeared or search isn't working), you can also open Command Prompt as an administrator using the Run dialog:
- Press Windows key + R.
- Type cmd.
- Press Ctrl+⇧ Shift+↵ Enter at the same time.
- Click Yes when prompted.
-
Enter the reboot command you want to run, followed by ↵ Enter. To reboot your PC from the command prompt, you'll use the shutdown /r command, along with your desired options. Here are some common ways to shut down the computer:[1]
- shutdown /r - Closes all open applications and reboots the computer in 60 seconds. A dialog window will appear, giving you the option to cancel before 60 minutes elapse.
-
shutdown /r /t <seconds> - Reboots the computer in the preferred number of seconds.
- For example, to reboot the computer in 5 minutes, enter shutdown /r /t 300.
- shutdown /r /t 0 - Reboots the computer right now with no warning or option to stop it.
- shutdown /r /g - Reboots the computer now, then reopens any applications that are set to launch automatically.
- shutdown /r /m \\<computerName> - Reboots a remote computer in 60 seconds.





