To learn how to restart or shut down a computer through the Windows command line or MS-DOS, select a link below.

Restart or shut down in the Windows command line

To restart or shutdown a computer from the Windows command line, you can use the shutdown command. If you need to do this often, you can also create a batch file that performs the shutdown command to restart or shutdown.

  • Restart or shut down in the Windows command line.

  • How to restart or shut down in MS-DOS.

  • How to shut down or restart the computer with a batch file.

How to restart or shut down in MS-DOS

To restart a computer running MS-DOS, press Ctrl+Alt+Del keys to restart the computer. If you need to turn off the computer, press the power button.

The steps below are for older computers that either boot into MS-DOS or are only running MS-DOS. If you started MS-DOS from within Windows, see the above steps for restarting or shutting down the computer from the Windows command line.

Newer computers may not allow the computer to be shut down unless the power button is held in for a few seconds.

If you are running a Windows command line from within Windows, it is important that you do not follow the above instructions. Instead, type exit to return to Windows and then restart or shut down from Windows. You may also follow the steps mentioned at the top of this page.

  • How to restart Microsoft Windows.
  • See our MS-DOS, reboot and shutdown definitions for further information and related links.
  • MS-DOS and Windows command line help and support.