Restart Your Computer in Three Commands

You can restart your computer from Command Prompt using the shutdown command with a restart flag. The simplest version is shutdown /r /t 0, which restarts when ready. If you want a delay — say, to save your work — use shutdown /r /t 60 to restart after 60 seconds. You can replace 60 with any number of seconds you need.

Command Prompt is the text-based tool built into Windows that lets you control your computer by typing commands instead of clicking. It is useful when your mouse or keyboard is not responding, when you need to restart a computer remotely, or when you want to schedule a restart for a specific time.

Key Takeaways

  • Type shutdown /r /t 0 into Command Prompt and press Enter to restart when ready.
  • Use shutdown /r /t 60 to delay the restart by 60 seconds, giving you time to save work.
  • Type shutdown /a to cancel a restart that is already scheduled.
  • Open Command Prompt by pressing Windows key + R, typing cmd, and pressing Enter.
  • You need administrator rights to run the shutdown command on most computers.

Opening Command Prompt on Your Computer

The fastest way to open Command Prompt is to press the Windows key and R at the same time. A small box called "Run" will appear. Type cmd and press Enter. Command Prompt will open in a new window with a black background and white text.

If the Run box does not appear, you can also open Command Prompt by clicking the Windows Start button, typing cmd into the search box, and pressing Enter. On Windows 11, you may see "Command Prompt" or "Windows PowerShell" — either one works for the restart command.

If you need to restart a computer that is not responding to normal commands, right-click on Command Prompt in the search results and select "Run as administrator." This gives the shutdown command the permissions it needs to work.

The when ready Restart Command

To restart right away, type this exactly: shutdown /r /t 0. The /r flag tells your computer to restart (not just shut down). The /t 0 means zero seconds delay — it restarts when ready. Press Enter after typing the command.

Your computer will begin shutting down within seconds. All open programs will close. If you have unsaved work, save it before you run this command, because you will lose anything you have not saved to disk.

If you see an error message that says "Access Denied," you need to run Command Prompt as administrator. Close this window, right-click on Command Prompt, select "Run as administrator," and type the command again.

Scheduling a Restart with a Time Delay

If you need a few moments to close programs or save files, add a delay. Type shutdown /r /t 120 to restart after 120 seconds (two minutes). You can use any number of seconds — /t 300 gives you five minutes, /t 600 gives you ten minutes.

When you press Enter, you will see a message telling you when the restart will happen. A notification will also appear on your screen counting down the time. This gives you a clear warning before the restart begins.

If you change your mind after scheduling a restart, you can cancel it. Open Command Prompt again and type shutdown /a, then press Enter. The scheduled restart will be cancelled when ready.

Adding a Message Before Restart

You can display a message on your screen before the restart happens. This is useful if you are restarting someone else's computer and want to explain why. Type shutdown /r /t 60 /c "Your message here". Replace "Your message here" with whatever text you want to show.

The message will appear in a dialog box on the screen, along with the countdown timer. The person using the computer will see both the message and how many seconds remain before the restart. Keep the message brief — long text may not display properly in the dialog box.

Common Mistakes and How to Avoid Them

The most common mistake is forgetting the forward slashes. The command must be shutdown /r /t 0, not shutdown -r -t 0 or shutdown r t 0. Windows Command Prompt uses forward slashes for flags, not hyphens or spaces.

Another mistake is typing the command but forgetting to press Enter. The command does nothing until you press Enter — typing it is not enough. After you type the full command, always press Enter to execute it.

If you are restarting a work computer or a shared machine, tell other users first. A sudden restart will close their programs and lose their unsaved work. Use the delay option (/t 300 or longer) to give them time to save and close their own files.

Restarting a Remote Computer

If you need to restart a different computer on your network, you can do that from Command Prompt too. Type shutdown /r /t 0 /m \\computername, replacing "computername" with the actual name of the other computer. You need administrator rights on that computer for this to work.

This is useful in a workplace where IT staff manage multiple machines, or if you need to restart a computer in another room. The remote computer will restart just as if you had typed the command on it directly. You will not see a countdown on the remote machine unless you add the /c flag with a message.

Frequently Asked Questions

What is the difference between shutdown /s and shutdown /r?

/s shuts down your computer completely and turns off the power. /r shuts down and then restarts automatically. Use /r when you want the computer to turn back on; use /s when you want it to stay off.

Can I restart my computer from Command Prompt if it is frozen?

If your computer is completely frozen and not responding to keyboard or mouse input, Command Prompt will not open. In that case, hold down the power button for 10 seconds to force a shutdown, then press the power button again to turn it back on. This is a hard restart and may cause data loss, so use it only when the computer is not responding at all.

How do I know if the restart command worked?

You will see a message in Command Prompt saying the shutdown has been initiated, and your screen will begin showing the shutdown process. Windows will close all open programs and display a "Shutting down" message. The computer will then restart automatically.

Can I schedule a restart for a specific time, like 3 PM?

Command Prompt's shutdown command only accepts delays in seconds from the moment you run it. To restart at a specific time, use Windows Task Scheduler instead. Search for "Task Scheduler" in the Start menu, create a new task, and set it to run the shutdown command at your chosen time.

What happens to my open files if I restart from Command Prompt?

All open programs will close, and any unsaved changes will be lost. Before you run the restart command, save all your work in every open program. If you use the delay option (/t 300 or longer), you will have time to do this before the restart begins.