How to Restart Your Computer From Command Prompt

Learn how to reboot computer from command prompt with shutdown /r /t 0, set a restart countdown, or cancel a restart before time runs out.

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To restart your computer from Command Prompt, run shutdown /r /t 0 and press Enter. This command restarts Windows with no countdown. You can use it on Windows 11 and Windows 10.

The short version

  • Restart now: Run shutdown /r /t 0 for a restart with no countdown.
  • Add a countdown: Run shutdown /r /t 60 for a 60-second delay, which also implies forced app closure and can lose unsaved work.
  • Cancel in time: Run shutdown /a in a new Command Prompt during the countdown.
  • Force closure carefully: Adding /f forces applications to close and can lose unsaved work.

TaskCommandWhat to expect
Restart immediatelyshutdown /r /t 0No countdown
Use the default delayshutdown /r30-second countdown with forced app closure
Choose a delayshutdown /r /t 6060-second countdown with forced app closure
Cancel a pending restartshutdown /aRun during the countdown
Force an immediate restartshutdown /r /f /t 0Forced app closure can lose unsaved work
Open advanced boot optionsshutdown /r /o /t 0Restarts into advanced boot

Open Command Prompt

Press Windows + R to open Run. Type the following command, then press Enter to open Command Prompt.

Open Command Prompt from the Start menu search.
Click to expand
Open Command Prompt from the Start menu search.
cmd

You can also press the Windows key, search for cmd, and select Command Prompt. If you already have File Explorer open, type cmd in its address bar and press Enter.

Restart your computer immediately

In Command Prompt, enter the command below and press Enter. The /r option selects a restart, and /t 0 sets the delay to zero seconds.

shutdown /r /t 0

Set a restart countdown

For the default 30-second countdown, enter the following command and press Enter. Microsoft says a positive timeout implies forced application closure, which can lose unsaved work.

shutdown /r

To choose a 60-second countdown, enter the command below and press Enter. The number after /t sets the delay in seconds. This positive timeout also implies forced application closure and can lose unsaved work.

shutdown /r /t 60

Cancel a restart before the countdown ends

While the countdown is running, press Windows + R, enter cmd, and press Enter to open a new Command Prompt. Enter the following command in that new window and press Enter. You must run it before the countdown ends.

shutdown /a

Force applications to close when necessary

To force applications to close during an immediate restart, enter the command below and press Enter. Adding /f explicitly requests forced closure. Forced application closure can lose unsaved work.

shutdown /r /f /t 0

Restart into advanced boot options

To restart into advanced boot options, enter the command below and press Enter. The /o option selects advanced boot options, while /t 0 removes the countdown.

shutdown /r /o /t 0

You can also enter recovery by holding Shift while selecting Power > Restart. If you prefer to use Windows Settings, follow the path for your version below.

On Windows 11, open Settings > System > Recovery. Under Recovery options, beside Advanced startup, select Restart now.

On Windows 10, open Settings > Update & Security > Recovery. Under Advanced startup, select Restart now.

Fix problems restarting your computer

If you need to run the restart command with administrator authorization, search for cmd, right-click Command Prompt, and select Run as administrator. If prompted, select Yes, then run your restart command in that window.

For a menu alternative, select Start > Power > Restart. You can also press Ctrl + Alt + Delete, select Power in the lower-right corner, then select Restart.

Select Start to open the Windows Start menu.
Click to expand
Select Start to open the Windows Start menu.

If software restart controls fail, you can restart a computer that is unresponsive using its physical power button. A forced power-off can lose unsaved work. Hold the power button until the PC turns off, wait briefly, then press it again to start. The timing varies by model, so follow your computer model's instructions.

Frequently Asked Questions

Can I use Command Prompt inside Windows Terminal?

Yes, open Windows Terminal, select the down arrow beside the + button, then select Command Prompt. You can run the restart command in that tab on Windows 11 or on Windows 10 with Windows Terminal installed.

Can a restart reopen my applications automatically?

Use shutdown /g /t 0 to restart the computer and restart registered applications. Application restoration depends on Automatic Restart Sign-On.

Should I use a WMIC reboot command from an older tutorial?

Microsoft deprecated WMIC and directs you to PowerShell or WMI APIs instead. WMI itself remains supported.

Do I need to download PsShutdown to restart from Command Prompt?

No, the built-in shutdown command does not require PsShutdown. That optional Microsoft Sysinternals utility also supports timed restarts, messages, multiple targets, and cancellation.

Share