How to Open Command Prompt at Boot In Windows 11
- 2 ways to do it
- Needs administrator rights
- Includes a restart or sign-out
Open Command Prompt before Windows loads to repair a PC that won’t start or whose desktop you can’t reach.
To open Command Prompt before Windows loads, press Shift+F10 on the Windows Setup screen if you have installation media, or go to Settings System Recovery and select Restart now next to Advanced startup. Then choose Troubleshoot, Advanced options, and Command Prompt. No changes are made to your PC by opening it.
What is Command Prompt?
Command Prompt is a black window where you type commands to tell your computer what to do. Windows 11 also includes PowerShell, a similar tool with more capabilities. You can use either one to fix problems or automate tasks such as backups.
Why open Command Prompt before logging in?
Sometimes Windows won’t start properly, or you can’t open Command Prompt from inside Windows. Opening it during boot lets you work on the problem before Windows fully loads. Windows isn’t running at that point, so its system files aren’t in use. You can often repair or replace files that are normally locked.
How to open Command Prompt at startup on 🪟 Windows 11
You have two ways to do it:
- Windows installation media (a USB drive or DVD with the Windows setup files)
- The Advanced Startup options built into Windows
Use the installation media method if Windows won’t start at all. Use Advanced Startup if you can still sign in, or if Windows has already booted into its recovery menu on its own.
Method 1Open Command Prompt with SHIFT + F10 during Windows setup
The Windows Setup screen has a keyboard shortcut that opens Command Prompt before Windows begins to load. You don’t need to go through the installation, and opening the window changes nothing on your PC.
- Insert the USB drive or DVD and restart your computer.
- If the PC starts into Windows instead of the media, restart and open the boot menu. The key depends on the manufacturer and is often F12, F2, Esc or Del. It usually appears briefly on the first screen. Choose the USB drive or DVD from the list.
- If you see “Press any key to boot from CD or DVD”, press any key. If you miss the prompt, restart and try again.
- Wait for the Windows Setup screen, where you pick your language and keyboard settings.
- Press Shift+F10. On some laptops you also need the Fn key, so try Fn + Shift+F10 if nothing happens.

A Command Prompt window opens on top of the setup screen, ready for commands. For example, type cd /d C:\ and press Enter to switch to another drive.

When you finish, close the Command Prompt window with the X button. Then close the Windows Setup window and confirm that you want to cancel. The PC restarts. Remove the USB drive or DVD during the restart so the PC boots normally.
Method 2Open Command Prompt from Advanced Startup menu
Advanced Startup is the easiest route if you can still get into Windows. Windows can also open it by itself after a few failed startups. In that case you see a “Recovery” screen, and you select See advanced repair options to reach the same menu.
This method requires an administrator account. Windows asks you to sign in with one before it opens Command Prompt.
- Select the Start button, then the Power icon.
- Hold down the Shift key and select Restart. Keep holding Shift until the screen changes. Your PC restarts to a blue screen titled “Choose an option”.
- Select Troubleshoot.
- Select Advanced options.
- Select Command Prompt.
- When the PC restarts again and asks you to pick an account, choose an administrator account and enter its password. If BitLocker protects the drive, Windows may also ask for the recovery key.
You can reach the same menu from Settings System Recovery. Next to Advanced startup, select Restart now.
On the blue “Choose an option” screen, select Troubleshoot.

On the Troubleshoot screen, select Advanced options.

On the Advanced options screen, select Command Prompt.

After you sign in, a Command Prompt window opens and you can type commands. As with installation media, the drive letters can differ from what you see in Windows. Check which drive holds your Windows folder before you run anything.

When you finish, close the Command Prompt window. On the Advanced options screen, select Continue to start Windows normally, or Turn off your PC to shut down.
Summary
If Windows still won’t start after you restart normally, repeat either method and check the other drive letters for your Windows folder. For more commands to try from this window, visit Microsoft’s official page.
Frequently asked questions
How to open CMD in Windows setup?
On the Windows Setup screen, the first one that asks for your language and keyboard, press Shift+F10. A Command Prompt window opens right away. If nothing happens, click Repair your computer at the bottom left, then choose Troubleshoot, Advanced options, and Command Prompt.
How to use command prompt?
Type a command at the blinking cursor and press Enter. Each command tells Windows to do one task, such as ipconfig to show network details or dir to list files in the current folder. Commands are not case-sensitive. Type exit and press Enter to close the window.
How to get to command prompt during boot?
Turn the PC on, then hold the power button for about 10 seconds to shut it off when the Windows logo appears. Repeat this two or three times. Windows then opens its recovery screen. Choose Advanced options, then Troubleshoot, then Command Prompt.
How to open command prompt on Windows setup?
From the first Windows Setup screen, press Shift+F10. A Command Prompt window opens. On some laptops, you need Shift + Fn + F10 instead. If the window does not open, click Repair your computer, then Troubleshoot, Advanced options, and Command Prompt.
How to open command prompt 🪟 Windows 11?
Click the Start button, type cmd, and select Command Prompt from the results. To run it with admin rights, which many repair commands need, select Run as administrator. You can also press Win+R, type cmd, and press Ctrl+Shift+Enter.
How to boot to command prompt 🪟 Windows 11?
Open Settings, select System, then Recovery. Next to Advanced startup, click Restart now. Save your open work first, because the PC restarts right away. On the blue menu, choose Troubleshoot, Advanced options, and Command Prompt. Sign in with an admin account if asked.
Still have a question?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!