How to shut down a Windows computer from the command line

Table of contents:

How to shut down a Windows computer from the command line
How to shut down a Windows computer from the command line
Anonim

In this article, we are going to show you how to shut down your Windows computer using the command line.

Steps

Shut Down Your Windows Computer from the Command Line Step 1
Shut Down Your Windows Computer from the Command Line Step 1

Step 1. Open the Start menu

To do this, click on the Windows logo in the lower right corner of the screen, or press the ⊞ Win key on your keyboard. The cursor will appear in the Start menu search bar.

Shut Down Your Windows Computer from the Command Line Step 2
Shut Down Your Windows Computer from the Command Line Step 2

Step 2. Enter Command Prompt in the Start Menu search bar

This will search for the Command Prompt utility and appear at the top of the Start menu.

  • To open the search bar in Windows 8, move your mouse to the upper-right corner of the screen, and then click the magnifying glass icon.
  • In Windows XP, click the Run utility on the right side of the Start menu.
Shut Down Your Windows Computer from the Command Line Step 3
Shut Down Your Windows Computer from the Command Line Step 3

Step 3. Right click on the Command Prompt utility

Its icon looks like a black square with white symbols. A menu will open.

In Windows XP, type cmd in the Run window

Shut Down Your Windows Computer from the Command Line Step 4
Shut Down Your Windows Computer from the Command Line Step 4

Step 4. Click Run as administrator

It's near the top of the menu. A command prompt window will open with administrator rights.

  • To confirm your choice, click "Yes" when prompted.
  • In Windows XP, click OK to open a Command Prompt window.
  • You will not be able to run Command Prompt with administrator rights if filters are installed on the computer, or on a public computer or on a networked computer (for example, in a library or at a school).
Shut Down Your Windows Computer from the Command Line Step 5
Shut Down Your Windows Computer from the Command Line Step 5

Step 5. Enter shutdown -s at the command line

This command will shutdown the computer within one minute.

  • To shutdown the computer immediately, enter shutdown -s -t 00 at a command prompt.
  • To shutdown the computer after a specified number of seconds, enter shutdown -s -t ##, where "##" is the number of seconds (for example, "06" is six seconds, "60" is one minute, "120" is two minutes, and etc).
Shut Down Your Windows Computer from the Command Line Step 6
Shut Down Your Windows Computer from the Command Line Step 6

Step 6. Press ↵ Enter

The command will be executed and the computer will shut down. This will usually happen within a minute.

If you have multiple programs running on your computer, Windows will close them first. Be sure to save open files before turning off your computer

Advice

Use this method to bypass some programs and shut down your computer quickly, because these programs slow down the shutdown process

Popular by topic