How to Open Command Prompt Before Windows Starts (the “CMD in BIOS” Question)

You can’t open Command Prompt from the BIOS itself. The BIOS (or UEFI firmware) runs before Windows and doesn’t include a command line. What most people mean is opening Command Prompt before Windows starts, from the Windows Recovery Environment. In Windows 10, go to Settings > Update & Security > Recovery > Advanced startup > Restart now, then choose Troubleshoot > Advanced options > Command Prompt. If Windows won’t start, you can get there automatically after failed boots, or boot from a Windows USB drive and press Shift + F10.

This guide covers all three ways, plus useful commands and how to get into the real BIOS if that’s what you need.

BIOS vs. recovery Command Prompt

BIOS/UEFI setup Recovery Command Prompt
What it is Firmware settings for your hardware A text command line from Windows’ recovery tools
Use it for Boot order, Secure Boot, virtualization, date and time Repairing startup, fixing disks, copying files, resetting boot files
How to get there A key like F2, F10, Del, or Esc at power-on Advanced startup, automatic repair, or Windows USB media

Method 1: From Windows (Advanced startup)

  1. Open Settings with Windows key + I.
  2. Click Update & Security > Recovery.
  3. Under Advanced startup, click Restart now.
  4. Choose Troubleshoot > Advanced options > Command Prompt.
  5. Choose your account and enter its password if asked.
Windows recovery Advanced options screen with the Command Prompt tile highlighted
(1) Choose Command Prompt from Advanced options in the recovery environment. (Illustration)

Shortcut: hold Shift while you click Restart in the Start menu’s power options, or on the sign-in screen, to go straight to these recovery options.

Method 2: When Windows won’t start

  1. Turn on the PC. As soon as the Windows logo or spinning dots appear, hold the power button until it turns off.
  2. Repeat this two more times. On the third start, Windows usually shows Preparing Automatic Repair.
  3. On the Automatic Repair screen, click Advanced options.
  4. Choose Troubleshoot > Advanced options > Command Prompt.

Forcing shutdowns is safe for this purpose, but avoid it while Windows is installing updates.

Method 3: From a Windows installation USB

  1. Create a Windows 10 USB drive with Microsoft’s Media Creation Tool on another PC.
  2. Plug it in and boot from it. You may need to press a boot-menu key like F12, F11, or Esc at power-on, or change the boot order in the BIOS.
  3. When the Windows Setup screen appears, press Shift + F10. Command Prompt opens right away.

You can also click Next > Repair your computer > Troubleshoot > Command Prompt.

Useful commands in recovery Command Prompt

Command What it does
bcdedit Shows your boot configuration and which drive letter Windows is on
chkdsk C: /f Checks and fixes file system errors (use the correct Windows drive letter)
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows Repairs Windows system files from recovery
bootrec /fixmbr, bootrec /fixboot, bootrec /rebuildbcd Repairs boot records on older or BIOS-mode systems
diskpart then list volume Shows all drives and their letters
notepad Opens Notepad, whose File > Open window works as a basic file browser for copying files

In recovery, Windows may not be on drive C:. Run diskpart, then list volume, and look for the large NTFS volume before running repair commands. Type exit to leave diskpart.

How to open the real BIOS instead

  • From the Advanced options screen above, choose UEFI Firmware Settings > Restart.
  • Or press your PC’s setup key at power-on, often F2, Del, F10, or Esc.

For details, see how to enter the BIOS on Windows 10.

Related: Boot to Command Prompt in Windows 10.

Frequently asked questions

Why don’t I see Command Prompt under Advanced options?

Click See more recovery options if it’s shown. If recovery tools are damaged or missing, use a Windows USB drive (Method 3).

It asks for a BitLocker recovery key. What do I do?

Your drive is encrypted. See how to find your BitLocker recovery key before continuing.

Can I reset a forgotten password from recovery Command Prompt?

Only use official methods. See how to reset a Windows 10 password for safe options, like resetting a Microsoft account password online.

How do I get back to Windows?

Type exit and press Enter, then click Continue to start Windows normally.