Restart and Shut Down Your PC via Command Prompt in Windows 10

Restarting a personal device is necessary in several cases – if a problem occurs, the operating system freezes, and some changes or installed drivers need to be activated. Sometimes the standard steps to start the procedure do not work, so they use restarting the computer from the Command Prompt. Yes, you can shut down and restart a computer or log off a Windows 11 or Windows 10 user with Command Prompt, and in this guide, we’ll show you how.

The “normal” way to reboot a computer running Windows 11/10 is Open the Start menu, Select the power icon at the bottom and Select Restart or shutdown option.

How to open the command line?

Command Line or command prompt is a special tool built into the operating system that performs specified actions after typing a command on the keyboard. You can perform Forced reboot and shutdown-related operations (timer activation, process cancellation, etc.) using standard queries.

There are several ways to open the command prompt on Windows 11 or Windows 10 PC. You can press the Windows key + S and type cmd, right-click on the command prompt and select run as administrator.

open command prompt as administrator

Click yes if UAC prompt for permission to run the application with administrative permissions.

Turn off the computer with the shutdown command

You can shut down or turn off your computer using the shutdown /s command line.

If you are looking for shutdown the computer after a specific time then type the command shutdown /s /t TIME (replace TIME for the second to wait before the computer begins the shutdown).

shutdown command

Run the shutdown /p command to shut down the computer without waiting or warning

Again sometimes you may notice while you shut down or restart your PC you will notice some programs already running and your device prompt to close them. Run the command shutdown /s /f to forcing all apps to close without warning and shutdown your computer.

Also, you can shut down your computer with a custom dialog message, for example, “your PC shutdown in 30 min” To do so run the command shutdown /s /t TIME /c “your message” Here you need to replace TIME with the number of seconds before shut down your PC and replace your message with the custom text you want to display to the user.

For example, the final command will be like: shutdown /s /t 60 /c “important update install”

Restarting Windows with the shutdown command

This combination of characters is considered a standard command function that helps to restart the personal computer. The procedure will start automatically if you type “shutdown / r / t 180” and press enter key. In this case, figure 180 means the number of seconds after which the device will be restarted.

Attention! If a situation arises in which an immediate restart of the entire operating system is required, the shutdown / r / t 0 command is typed. It is impossible to cancel the operation, so it is better to leave a “reserve” in time.

Again run the command shutdown /r /p to restart your computer without waiting or warning. And run command shutdown /r /f to force all running apps to close without warning and restart your PC.

In addition, you can run the shutdown /L command to sign out the current user, applicable only to local computer.

Instant of shutdown or restarting, you can use shutdown /h command to hibernate the computer.

Pro tip: You can use command shutdown /r /fw to restart and boot in to Unified Extensible Firmware Interface (UEFI) or Basic Input Output System (BIOS) firmware. And running shutdown /r /o command allow access the advanced boot options

Also read:

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More