How to Boot to Command Prompt in Windows 10: A Step-by-Step Guide

To boot to Command Prompt in Windows 10, hold Shift while clicking Restart (from the Start menu or the sign-in screen). When the blue Choose an option screen appears, click Troubleshoot > Advanced options > Command Prompt, choose your account, and enter its password. If Windows won’t start, boot from a Windows installation USB and press Shift + F10 on the first setup screen, or let Windows fail to start three times to open the recovery environment automatically.

Note: Windows 10 reached end of support on October 14, 2025. Consumer Extended Security Updates (ESU) now run until October 12, 2027. These steps still work on Windows 10, but upgrading to Windows 11 is the long-term way to keep getting security fixes.

This guide covers every way to reach a startup Command Prompt, Safe Mode with Command Prompt, what you can do there, and how to get back to Windows.

Method 1: Shift + Restart

  1. Click Start > Power, then hold Shift and click Restart. (This also works from the power icon on the sign-in screen.)
  2. On Choose an option, click Troubleshoot.
  3. Click Advanced options > Command Prompt.
  4. Select your account and enter the password (or recovery key if BitLocker asks).
Windows recovery environment Advanced options screen with the Command Prompt tile highlighted
In Advanced options, click Command Prompt. (Illustration)

Method 2: From Settings

  1. Go to Settings > Update & Security > Recovery.
  2. Under Advanced startup, click Restart now.
  3. Follow the same path: Troubleshoot > Advanced options > Command Prompt.

Method 3: When Windows won’t start

  • Automatic repair – if Windows fails to start twice in a row, it usually opens Automatic Repair on the third try. Click Advanced options to reach the same menu. You can trigger this by turning the PC off during startup a few times.
  • Installation USB – create a Windows 10 USB drive with Microsoft’s Media Creation Tool on another PC, boot from it, and press Shift + F10 on the language screen. Or click Next > Repair your computer > Troubleshoot > Command Prompt.

Method 4: Safe Mode with Command Prompt

  1. From Advanced options, choose Startup Settings > Restart.
  2. Press 6 or F6 for Enable Safe Mode with Command Prompt.
  3. Sign in. Windows starts with a Command Prompt window instead of the normal desktop.

Useful commands at startup

Command What it does
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows Repair system files offline
chkdsk C: /f Fix file system errors
bootrec /fixmbr, bootrec /fixboot, bootrec /rebuildbcd Repair boot records (use with care)
diskpart then list volume See drive letters, which can differ in recovery
notepad Open Notepad; use File > Open to browse and copy files

In the recovery environment, your Windows drive may not be C:. Check with diskpart > list volume first.

More recovery commands

Command When to use it
bcdboot C:\Windows Recreates boot files on modern UEFI PCs. Use it when bootrec /fixboot returns “Access is denied”.
bootrec /scanos Lists Windows installations the boot manager can find
dism /image:C:\ /cleanup-image /restorehealth Repairs the offline Windows image when SFC can’t fix files
rstrui.exe Opens System Restore from the command line
bcdedit /enum Shows the current boot configuration

Replace C: with the drive letter you found using list volume. To rescue files before trying repairs, see copying files with Command Prompt and copy them to a USB drive.

Make a recovery drive before you need it

If Windows still starts, search for Create a recovery drive in the Start menu and follow the steps with a USB drive of at least 16 GB. Booting from it gives you the same Troubleshoot menu and Command Prompt even if the PC’s own recovery partition is damaged. Our guide to making a bootable Windows 10 USB with CMD covers installation media too.

Troubleshooting

  • Shift + Restart goes straight back to Windows: Hold Shift until the blue screen appears, or use Settings > Update & Security > Recovery > Restart now instead.
  • No Command Prompt option: The recovery partition may be missing. Boot from a recovery drive or installation USB.
  • Keyboard doesn’t work: Try a different USB port, preferably one directly on the PC rather than a hub.
  • Startup Repair keeps failing: See how to fix Startup Repair in Windows 10.

Get back to Windows

Type exit and press Enter, then choose Continue to start Windows 10.

Related: fix a Windows 10 boot loop.

Related: Open Command Prompt before Windows starts.

Frequently asked questions

Do I need an administrator account?

Yes. The recovery Command Prompt asks you to sign in with an administrator account.

Why does it ask for a BitLocker key?

If your drive is encrypted, Windows needs the recovery key to unlock it. Find it at account.microsoft.com/devices/recoverykey.

Does this work on Windows 11?

Yes. Shift + Restart and the Advanced options menu work the same way.

Can I reset my password from the recovery Command Prompt?

No. It requires an administrator sign-in, and Microsoft account passwords can only be reset online at account.live.com/password/reset. Use the “I forgot my password” link on the sign-in screen instead.