Restarting from Command Prompt: The Basic Steps

You can restart your computer from Command Prompt by typing a single command and pressing Enter. The command is shutdown /r /t 0 — the /r tells Windows to restart, and /t 0 means restart when ready with no delay. Open Command Prompt, type that line, and your computer will begin shutting down and restarting within seconds.

If you want a delay before the restart happens, change the 0 to a number of seconds. For example, shutdown /r /t 60 gives you 60 seconds before the restart begins. This is useful if you need time to save work or warn other people on your network.

Key Takeaways

  • Type shutdown /r /t 0 in Command Prompt to restart your computer when ready.
  • You must open Command Prompt as an administrator for the shutdown command to work.
  • Use shutdown /s /t 0 to shut down instead of restart, or shutdown /a to cancel a shutdown that is already in progress.
  • If Command Prompt does not recognize the command, your user account may not have administrator permissions.

Opening Command Prompt as Administrator

Command Prompt must run with administrator permissions for the shutdown command to work. On Windows 10 or 11, press the Windows key and type "cmd" — you will see "Command Prompt" appear in the search results. Right-click on it and select "Run as administrator." Windows will ask for permission; click "Yes" to proceed.

An alternative is to press Windows key + R to open the Run dialog, type "cmd", and press Ctrl + Shift + Enter instead of just Enter. This also launches Command Prompt as administrator. Either method opens a window with "Administrator:" in the title bar — that is your signal the permissions are correct.

The Shutdown Command and Its Options

The shutdown command has several variations depending on what you want to do. shutdown /r /t 0 restarts when ready. shutdown /s /t 0 shuts down without restarting. shutdown /h /t 0 puts your computer into hibernation. Each one uses the /t parameter to set seconds before the action happens.

You can also add a message that appears on the screen before shutdown. Type shutdown /r /t 60 /c "Your message here" to show text to anyone using the computer. The message appears in a dialog box and gives users a chance to see why the restart is happening. This is especially useful on shared computers or in an office setting.

Canceling a Restart That Is Already Scheduled

If you typed the shutdown command but changed your mind, you can stop it before it happens. Type shutdown /a in Command Prompt and press Enter. This cancels any shutdown or restart that is currently scheduled. You have until the timer runs out — if you set /t 60, you have 60 seconds to cancel.

After you type shutdown /a, a message will appear saying "The shutdown has been aborted" or similar text. If no shutdown is scheduled, you will see an error message instead. Either way, your computer will not restart unless you type a new shutdown command.

Troubleshooting When the Command Does Not Work

If you type the shutdown command and nothing happens, the most common reason is that Command Prompt is not running as administrator. Close the window, right-click on Command Prompt, and select "Run as administrator" again. Then type the command a second time.

Another possibility is that your user account does not have administrator permissions on the computer. If you are on a work or school computer, your IT department may have restricted shutdown commands. In that case, use the Start menu instead: click the Windows logo, select the power icon, and choose "Restart" from the menu. This method does not require Command Prompt or administrator permissions.

When to Use Command Prompt Instead of the Start Menu

For most people, restarting through the Start menu is simpler and faster than opening Command Prompt. However, Command Prompt is useful when the graphical interface is not responding or when you need to restart a computer remotely. If your mouse and keyboard are frozen, Command Prompt may still accept typed commands even when the rest of Windows is stuck.

System administrators and IT professionals also use Command Prompt to restart multiple computers at once or to schedule restarts for a specific time. The shutdown command can be included in batch files or scripts that run automatically. For a single restart on your own computer right now, the Start menu is usually the easier choice.

Frequently Asked Questions

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

/r restarts your computer — it shuts down and then starts up again automatically. /s shuts down completely and stays off until you press the power button. Use /r when you want the computer running again soon, and /s when you are done for the day.

Can I schedule a restart for a specific time instead of right now?

Yes. Use shutdown /r /t 3600 to restart in one hour (3600 seconds), or adjust the number to however many seconds you need. For example, /t 1800 restarts in 30 minutes. The timer starts as soon as you press Enter, so plan accordingly.

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

Windows will ask you to save unsaved files before restarting, just as it does when you restart from the Start menu. If you have a delay set (like /t 60), you have that much time to save your work before the restart begins. Any files you do not save will be lost.

Does the shutdown command work the same way on Windows 7 as on Windows 10?

Yes, the shutdown command works the same on Windows 7, 8, 10, and 11. The syntax and options are identical. The only difference is how you open Command Prompt as administrator — on Windows 7, right-click the Command Prompt icon in the Start menu and select "Run as administrator."

Can I use Command Prompt to restart someone else's computer on my network?

Yes, but only if you have administrator permissions on that computer and it is set up to allow remote commands. The syntax is shutdown /r /m \\computername /t 0, where "computername" is the name of the other computer. Most home networks do not have this set up by default, so this is mainly used in business environments.