How to Open CMD in BIOS: What Works Before Windows Boots

You can’t open CMD in BIOS, because the BIOS (or its modern replacement, UEFI firmware) runs before any operating system loads, and cmd.exe is a Windows program that needs Windows files in memory to exist at all. What most people searching for this actually want is a Command Prompt that works before Windows boots, and that does exist: it lives in the Windows Recovery Environment, reached through Troubleshoot, Advanced options, Command Prompt on the Advanced startup menu, or by pressing Shift+F10 on a Windows installation USB stick. The sections below give the exact clicks for each route, what to do when Windows won’t start at all, and how to get from that prompt back into the firmware.

Why You Can’t Open CMD in BIOS

Nothing in the BIOS can run Command Prompt, because BIOS and UEFI are firmware, not Windows, and firmware has no way to execute a Windows program. Their job is to test the hardware, apply settings such as boot order and fan curves, and hand control to a boot loader on a drive. Nothing in that job requires running Windows executables, so no firmware ships with cmd.exe, and there is no key combination in a BIOS setup screen that opens one.

Command Prompt is a different kind of thing. It’s a Windows program (cmd.exe in C:\Windows\System32) that depends on the Windows kernel, its drivers, and its file system stack. Microsoft’s own documentation for Windows Setup, which is written for the same moment before an operating system exists, makes the point indirectly: the command prompt it tells you to open with Shift+F10 comes from Windows PE, a cut-down Windows loaded from the installation media, not from the firmware.

Sites that promise a way to open CMD from the BIOS are describing one of two things. Either they mean opening Command Prompt from the recovery menu that appears before the Windows desktop, which is what the rest of this article covers, or they mean running a command in Windows that reboots the PC into the firmware, which gets its own section further down.

The UEFI Shell Is the Closest Thing to a Firmware Command Line

Some motherboards, mostly enthusiast desktop boards, include a UEFI Shell in their firmware, usually listed on the Boot or Exit tab. A long-running Tom’s Hardware forum thread describes it as closer to booting into a Windows or Linux command prompt than to the BIOS setup screens, and one reply there notes that not every board offers it. The shell speaks its own command set for listing drives, editing boot entries and launching .efi files. It can’t run cmd.exe, batch files, chkdsk, or anything else built for Windows, so for the repair jobs most people have in mind it’s not a substitute.

How to Open Command Prompt Before Windows Boots When Windows Still Starts

If the PC still reaches the desktop or the sign-in screen, the easiest route is the Advanced startup menu, which Microsoft’s recovery documentation treats as the front door to the Windows Recovery Environment (WinRE). Three ways lead there, and all three end at the same Command Prompt.

From Settings

  1. Windows 11: open Settings, then System, then Recovery, and under Advanced startup select Restart now.
  2. Windows 10: open Settings, then Update & Security, then Recovery, and under Advanced startup select Restart now.
  3. Confirm: Windows warns that it will restart. Save anything open, then confirm. The PC reboots to a blue Choose an option screen.
  4. Navigate: select Troubleshoot, then Advanced options, then Command Prompt.

The Windows 10 path still works as of September 2026, though Microsoft’s support site notes that Windows 10 reached end of support on October 14, 2025, and no longer receives security updates unless the PC is enrolled in the Extended Security Updates program, which runs until October 12, 2027. Recovery tools are unaffected by that date.

With Shift and Restart from the Sign-in Screen

Hold the Shift key while selecting Restart from the Power menu, either on the Start menu or on the sign-in screen. Microsoft’s WinRE technical reference lists this method first among its entry points, and it’s the one to use when you can’t sign in, since the power button on the sign-in screen works without a password. After the reboot, follow the same Troubleshoot, Advanced options, Command Prompt path.

With One Command from an Administrator Prompt

A Command Prompt already open in Windows can schedule the same reboot. Dell’s support article on the Advanced Startup Options menu gives the command as shutdown /r /o /f /t 00, and Microsoft’s shutdown command reference explains each piece: /r restarts, /o goes to the Advanced boot options menu and must be paired with /r, /f forces running apps to close without warning, and /t 00 sets the countdown to zero seconds. Save your work first, because /f discards unsaved changes.

What Happens on the Choose an Option Screen

After any of these three, the machine restarts into WinRE. Microsoft’s technical reference describes it as a separate environment based on Windows PE, stored on its own recovery partition so it can load even when the main Windows partition is damaged or encrypted. Choose an option shows Continue, Use a device, Troubleshoot and Turn off your PC. Troubleshoot leads to Reset this PC and Advanced options, and Advanced options is where Command Prompt sits next to Startup Repair, Startup Settings, Uninstall Updates, UEFI Firmware Settings and System Restore (Microsoft’s support page for WinRE also lists Point-in-time restore and System Image Recovery on some builds).

Two prompts can appear before the black window opens. Windows 10 asks you to pick a local administrator account and type its password before it will launch a tool; Microsoft’s reference for Windows 11 says most tools now run without that step. On a drive protected by BitLocker or Device Encryption, both versions ask for the 48-digit recovery key before they unlock the Windows volume, so look it up at account.microsoft.com/devices/recoverykey on your phone before you start.

How to Open Command Prompt When Windows Won’t Boot at All

You can open a command prompt when Windows won’t boot at all by letting the built-in recovery environment start itself, or by booting from Windows installation media and using the command prompt inside the installer. The Settings and Shift+Restart routes are gone at that point, since both need a sign-in screen to reach.

Let Automatic Repair Open the Recovery Menu

Microsoft’s WinRE reference says the recovery environment starts on its own after two consecutive failed attempts to start Windows, or two unexpected shutdowns within two minutes of boot completing. You can trigger that deliberately. Both Microsoft’s support page and Dell’s article give the same procedure: turn the PC on, and as soon as the Windows logo (or the manufacturer’s logo with the spinning dots) appears, hold the power button until the machine switches off. Do that twice. On the third start, leave it alone, and it should show Preparing Automatic Repair, then Diagnosing your PC, and finally a screen with an Advanced options button that opens the same Troubleshoot menu described above.

This method fails when the recovery partition is missing or has been disabled, which sometimes happens on PCs cloned to a new drive or with rearranged partitions. The symptom is a machine that keeps looping, or a blue error screen with no Advanced options button. Move on to installation media.

Boot Installation Media and Press Shift+F10

The fastest command prompt outside Windows comes from the installer itself. Microsoft’s Windows Setup documentation states it in one line: from inside Windows Setup, press Shift+F10 to open a command prompt window. This works on the very first language screen, before you’ve clicked anything, and it’s the same trick Microsoft’s docs use for wiping a drive with diskpart.

Making the Media

You need a working PC and a USB stick. An answer in Microsoft’s Q&A forum recommends 8 GB or larger. Download the tool from Microsoft’s Windows 11 download page (or the Windows 10 page for an older machine), run it, choose Create installation media, pick the language and edition, and let it write the stick. The version on the stick should match the Windows on the broken PC if you plan to run offline repair commands against it, though Shift+F10 itself works on any version.

Getting the PC to Boot from the Stick

  1. Plug in and power on: insert the USB stick in the broken PC and turn it on.
  2. Tap the boot-menu key: Dell uses F12 for its One Time Boot Menu; a Microsoft Q&A answer gives F12 or Fn+F12 for Lenovo; Microsoft’s firmware documentation lists Esc, Delete, F1, F2, F10, F11 and F12 as the common keys, and Volume up or Volume down on tablets.
  3. Pick the UEFI entry: choose the line that names both the stick and the mode, such as UEFI: USB Drive. Microsoft’s guide to UEFI and legacy boot notes you may see two entries for the same stick, and each boots the PC in a different firmware mode.
  4. Wait for Setup: the Windows Setup window with the language and keyboard drop-downs appears.
  5. Press Shift+F10: a black Command Prompt window opens over the installer.
  6. Leave the installer alone: don’t click Next or Install now. NinjaOne’s guide on this topic makes the point that you are not installing anything, and closing the Setup window later with the X is safe.

Use Repair Your Computer if the Shortcut Fails

The same media also carries WinRE. On the Install Windows screen, select Next, then Repair your computer in the lower-left corner, then Troubleshoot, Advanced options, Command Prompt. Microsoft’s troubleshooting article for startup problems uses this path rather than Shift+F10, and the two prompts are functionally the same. The difference is that the Repair route offers Startup Repair, System Restore and Uninstall Updates on the way, which are worth trying first when you’re not sure what command to run.

How to Get from CMD into the BIOS (the Trip in the Other Direction)

You can get from Command Prompt to the BIOS by running the shutdown command with the /fw switch, which reboots a UEFI PC straight into the firmware setup screens instead of Windows. The recovery menu offers the same trip as a UEFI Firmware Settings button under Advanced options, for when a command prompt isn’t handy.

The Shutdown /R /Fw Command

Open Command Prompt as administrator (right-click Start, then Terminal (Admin) or Command Prompt (Admin)) and run shutdown /r /fw /t 0. Microsoft’s shutdown reference says that combining /fw with a shutdown option causes the next restart to go to the firmware user interface. The PC reboots straight into the UEFI setup screens. If it reports that the firmware doesn’t support the request, the machine is booting in legacy BIOS mode or the firmware lacks the feature, and you’ll need the manufacturer’s key instead. The same reference notes that shutdown /a /fw clears a pending boot to firmware if you change your mind during the countdown.

The UEFI Firmware Settings Button in Advanced Options

The recovery menu offers the same thing as a button. Follow any of the routes above to Troubleshoot, then Advanced options, then select UEFI Firmware Settings and Restart. Microsoft’s WinRE documentation lists access to the firmware menu among the Advanced startup functions and marks it UEFI only, so a PC running in legacy BIOS mode (or a virtual machine with BIOS firmware) won’t show the option at all. On those machines, watch for the key named on the splash screen, or check the manufacturer’s support site.

Which Route to Use: A Side-by-side Comparison

Use the Advanced startup menu if Windows still boots to a desktop or sign-in screen, the two-forced-shutdowns trick or installation media if it does not, and the shutdown /r /o command when scripting or working remotely.

Route Windows must boot? Media needed? Prompts on the way Best for
Settings, Recovery, Restart now Yes, to the desktop No Local admin password on Windows 10; BitLocker key if encrypted Planned maintenance
Shift + Restart on the sign-in screen Only to the sign-in screen No Same as above Locked out of your account
shutdown /r /o /f /t 00 Yes, with an admin prompt No Same as above Scripts and remote sessions
Two forced shutdowns (Automatic Repair) No No Same as above No USB stick at hand
Install media, Shift+F10 No USB stick, 8 GB or larger None to open it; an encrypted Windows volume stays locked Fastest prompt on a dead install
Install media, Repair your computer No USB stick, 8 GB or larger BitLocker key if encrypted When you want Startup Repair first

Every menu name in the table was checked against Microsoft’s support and Learn pages as of September 2026, and Dell’s article on the topic carried a last-modified date of August 24, 2026, so the paths are current for both Windows 11 and Windows 10.

What the Recovery Command Prompt Looks Like and What to Run First

The window opens at X:\Sources or X:\Windows\System32, not at C:\. That X: drive is the RAM disk holding the recovery environment, and it’s the first surprise for most people. The second surprise is that the real Windows installation is often not C: either. NinjaOne’s guide warns that C: may show up as D:, and Microsoft’s startup troubleshooting article builds its whole repair sequence around finding that letter before running anything else.

Find the Right Drive Letter

  1. Run bcdedit: type bcdedit and press Enter.
  2. Read osdevice: in the Windows Boot Loader section, the osdevice line shows the letter of the Windows volume, for example partition=D:.
  3. Double-check: type dir D:\ and confirm you see Windows, Program Files and Users. If not, type diskpart, then list volume, find the NTFS volume of the right size, then exit.

A Worked Repair Sequence with Real Commands

Assume bcdedit showed partition=D:. Microsoft’s article gives the following order, and it’s a sensible default for a PC that stopped booting after an update or a power cut.

  1. Check the disk: chkdsk /f D: repairs file system errors on the Windows volume.
  2. Check system files: sfc /scannow /offbootdir=D:\ /offwindir=D:\windows verifies protected Windows files offline and replaces damaged ones.
  3. Repair the component store: DISM /image:D:\ /cleanup-image /restorehealth fixes the store SFC draws replacements from. Microsoft says to repeat the SFC step if DISM found and fixed anything.
  4. Leave cleanly: type exit, close the window, and choose Continue (or Turn off your PC) rather than holding the power button.

One caveat on the DISM step. Microsoft’s WinRE reference says the recovery environment doesn’t keep a general-purpose network connection by default, so DISM can’t pull replacement files from Windows Update the way it does inside Windows. NinjaOne suggests typing wpeinit to bring up networking; if that doesn’t help, point DISM at the install.wim on your USB stick with its /source switch, or accept that SFC alone may be enough.

What to Do if Shift+F10 or the Command Prompt Option Doesn’t Work

Shift+F10 Does Nothing on the Setup Screen

If Shift+F10 does nothing, the fix is usually a different key combination, since many keyboards send F keys to media functions by default. A Microsoft Q&A thread from 2022, still the top answer for this problem with more than 100 votes, reports that Fn+Shift+F10 works on Mac keyboards and on many laptops, and that Shift+Fn+F10 is the order some machines prefer. Wireless and Bluetooth keyboards are the next suspects, because Setup loads a limited driver set, so try a wired USB keyboard. If you’re on a company-imaged PC that’s stuck in the out-of-box setup, there’s a third possibility: Michael Niehaus’s Out of Office Hours blog documents a file, C:\Windows\Setup\Scripts\DisableCMDRequest.TAG, whose presence disables Shift+F10 during that setup. It lives on the installed Windows, so booting from your own USB stick and pressing Shift+F10 there is unaffected.

Command Prompt Is Missing from Advanced Options

When Advanced options shows Startup Repair and Startup Settings but no Command Prompt, or Automatic Repair never appears, the recovery image on the disk is usually missing or disabled. Microsoft’s technical reference explains that Windows RE normally sits on its own partition placed right after the Windows partition, and that some update or resize scenarios can leave the old partition orphaned. Installation media carries its own copy of the environment, so the Repair your computer route works regardless.

It Asks for a Password or Recovery Key You Don’t Have

A May 2026 Microsoft Q&A thread shows how this plays out in practice: the poster couldn’t get past the sign-in screen on a 2009 Lenovo laptop, and the Troubleshoot menu wouldn’t open Command Prompt for her. The answer that helped was to build a Windows 10 USB on another PC, boot it with F12, and take the Repair your computer path, which skips the account prompt entirely. For a BitLocker key, sign in to your Microsoft account on any device and open the recovery keys page; work or school accounts keep the key in the organization’s admin portal instead.

Safe Mode with Command Prompt as a Fallback

If Windows can boot but the desktop is broken, a different prompt may suit you better. Microsoft’s Windows startup settings page gives the path as Troubleshoot, Advanced options, Startup Settings, Restart, then pressing the number or F key for Safe Mode with Command Prompt. This starts real Windows with a minimal driver set and opens cmd.exe instead of Explorer, so drive letters are normal and installed tools are available, at the cost of needing a Windows that can still load.

Frequently Asked Questions

Can I Open Command Prompt from the F12 Boot Menu?

Not directly. The boot menu only lists devices the firmware can start from. Selecting a USB stick that holds Windows Setup and then pressing Shift+F10 is the closest thing, and it takes about a minute longer than the boot menu itself.

Does Shift+F10 Still Work on Current Windows 11 Installation Media?

Yes. Microsoft’s Windows Setup documentation still lists the shortcut as of September 2026, and the same page uses it for its own diskpart instructions. The only known blockers are keyboards that need the Fn key and the DisableCMDRequest.TAG file on managed PCs.

Is the Recovery Command Prompt an Administrator Prompt?

Effectively yes. Microsoft’s WinRE reference says most tools now run without an administrator password on Windows 11, and once the prompt is open it can read and write any unencrypted volume on the PC. Encrypted volumes stay locked until you supply the BitLocker recovery key.

Can I Open CMD in BIOS on a Virtual Machine?

No, for the same reason as on physical hardware. On a VM you can boot the Windows ISO and press Shift+F10, and the Microsoft Q&A thread about Mac hosts recommends Fn+Shift+F10 when the host keyboard swallows the F key. A VM configured with legacy BIOS firmware won’t show UEFI Firmware Settings in Advanced options, so use the VM software’s own boot-to-firmware option instead.

Do These Steps Still Apply to Windows 10 After End of Support?

Yes. Microsoft’s support page confirms Windows 10 stopped receiving updates on October 14, 2025, but says the software keeps working, and the recovery environment is part of that software. The menu path differs only in its first step: Update & Security rather than System.

Skip the search for a BIOS setting that doesn’t exist and pick the route that matches your situation: Shift and Restart if you can see the sign-in screen, two forced shutdowns if you can’t, and a Windows USB stick with Shift+F10 when the built-in recovery menu never shows up. Whatever you run there, start with bcdedit so you’re repairing the right drive letter, and keep your BitLocker recovery key within reach before the first restart.

References

  • Windows Recovery Environment (Windows RE), Microsoft Learn, read September 2026
  • Windows recovery environment, Microsoft Support, read September 2026
  • Windows Setup: Installing using the MBR or GPT partition style, Microsoft Learn, read September 2026
  • shutdown, Microsoft Learn, read September 2026
  • Use WinRE to troubleshoot startup issues, Microsoft Learn, read September 2026
  • Boot to UEFI Mode or Legacy BIOS mode, Microsoft Learn, read September 2026
  • Windows startup settings, Microsoft Support, read September 2026
  • Windows 10 support has ended on October 14, 2025, Microsoft Support, read September 2026
  • How to Boot to the Advanced Startup Options Menu in Windows, Dell Support, read September 2026
  • How to Open Command Prompt at Boot in Windows 11, NinjaOne, read September 2026
  • Shift +F10 not working, Microsoft Q&A, read September 2026
  • how to get to command prompt, Microsoft Q&A, read September 2026
  • Disable Shift-F10 in OOBE, Out of Office Hours, read September 2026
  • What is UEFI Shell, Tom’s Hardware Forum, read September 2026

Author Profile

Eric Dawson
Eric Dawson
Eric Dawson is the writer and curious mind behind The Money Watch. Based in Columbus, Ohio, he has a habit of digging into everyday questions until he understands what is actually going on, whether the subject is technology, travel, shopping, food, business, consumer products, or one of life's oddly specific problems.

Rather than pretending to be an expert in everything he covers, Eric approaches each topic as a careful researcher and practical problem-solver. He favors original sources, clear explanations, and honest answers about uncertainty. His goal is simple: do the digging readers shouldn't have to do themselves and turn what he finds into useful information without wasting their time.