The quickest shortcut to open Command Prompt on Windows is to press Win + R, type cmd, and press Enter. For an elevated (administrator) prompt, press Ctrl + Shift + Enter after typing cmd in the Run box. These methods work in Windows 11, 10, 8, and 7.
Why the Run Box Is the Fastest
The Win + R shortcut opens the Run dialog, a small input box that accepts commands. Typing cmd and pressing Enter launches Command Prompt in your user profile directory. This method is universally reliable because it does not depend on the Start menu layout, which has changed across Windows versions. On Windows 11, the Start menu no longer shows Command Prompt by default (it was replaced by Windows Terminal), making the Run box the most direct route for many users.
Other Keyboard Shortcuts That Work
If you prefer not to use the Run box, several other shortcuts open Command Prompt just as quickly:
- Win + X (or right-click the Start button) opens the Quick Link menu. In Windows 10, select “Command Prompt” or “Command Prompt (Admin).” In Windows 11, this menu shows “Terminal” and “Terminal (Admin)” instead; you can change Terminal’s default profile to Command Prompt if you prefer.
- Win + S opens Search. Type
cmd, then press Enter to open a normal prompt, or use Ctrl + Shift + Enter to run as administrator. - Win + R, type
cmd /kfollowed by a command (e.g.,cmd /k ipconfig) to open Command Prompt and immediately run that command, keeping the window open afterward. - Ctrl + Shift + Esc opens Task Manager, then use File > Run new task, type
cmd, and check “Create this task with administrative privileges” if needed.
How to Create a Permanent Desktop Shortcut
If you open Command Prompt frequently, a desktop shortcut saves a click. Right-click your desktop, choose New > Shortcut, and in the location field enter cmd.exe. Name it “Command Prompt” and finish. To make it always run as administrator, right-click the shortcut, select Properties, click Advanced, check “Run as administrator,” and click OK. This shortcut can also be pinned to the taskbar or Start menu for one-click access.
Opening Command Prompt From File Explorer
Sometimes you need a prompt that starts in a specific folder. In File Explorer, navigate to the desired directory, then click the address bar, type cmd, and press Enter. This opens Command Prompt with that folder as the working directory. Alternatively, hold Shift and right-click an empty area inside the folder; the context menu will include “Open command window here” (Windows 10) or “Open in Terminal” (Windows 11).
Common Problems and Fixes
If cmd does not open, the issue is usually one of the following:
- “Windows cannot find ‘cmd’.” This can happen if the System PATH variable is corrupted. Type
%SystemRoot%\system32\cmd.exein the Run box instead ofcmd. - Command Prompt opens and closes instantly. This often occurs when a command inside a batch file fails. To see the error, open a prompt manually and run the batch file from there, or add
pauseat the end of the batch file. - Access denied. If you need administrative rights, right-click the shortcut or search result and choose “Run as administrator.”
Command Prompt vs. PowerShell vs. Windows Terminal
Command Prompt (cmd.exe) is the legacy command interpreter dating back to MS-DOS. PowerShell is a more powerful shell with scripting capabilities and access to the .NET framework. Windows Terminal is a modern host application that can run Command Prompt, PowerShell, and even Linux shells in tabs. Since Windows 11, Microsoft’s default is Windows Terminal, but you can set it to open Command Prompt by default: open Windows Terminal, press Ctrl + , (comma) for settings, and under “Default profile” choose “Command Prompt.”
Advanced: Creating a Custom Keyboard Shortcut
You can assign a global hotkey to open Command Prompt. Create a desktop shortcut as described above, then right-click it and select Properties. In the “Shortcut key” field, press a key combination such as Ctrl + Alt + C. Windows will assign it, and you can use it from anywhere. Note that this only works for shortcuts on the desktop or in the Start menu, and it may conflict with other programs that use the same combination.
Frequently Asked Questions
How do I open Command Prompt as administrator?
Press Win + R, type cmd, then press Ctrl + Shift + Enter instead of Enter. You’ll see a User Account Control prompt; click “Yes” to confirm. Alternatively, in Search, type cmd, then select “Run as administrator” from the right pane or use Ctrl + Shift + Enter.
What is the difference between cmd and command?
cmd is the executable name for Command Prompt. command is the older MS-DOS interpreter (command.com) used in 16-bit systems; it is not present in modern 64-bit Windows. When you type command in Command Prompt, Windows may run a compatibility layer or show an error.
How do I change the default directory when opening Command Prompt?
If you want Command Prompt to always start in a specific folder, create a shortcut and modify its “Start in” field in Properties. For example, set it to C:\Users\YourName\Documents. Or, open the folder in File Explorer and use the address bar method described above.
Is there a way to open Command Prompt from the login screen?
Yes. On the login screen, click the power icon, hold Shift, and click “Restart.” This boots into the recovery environment. Then go to Troubleshoot > Advanced options > Command Prompt. This gives you a system-level prompt for recovery tasks.
Why does my Command Prompt show “C:\Users\username” instead of “C:\Windows\System32”?
By default, Command Prompt opens in the current user’s home directory. If you run it as administrator, it may open in C:\Windows\System32 because of the way the Run as administrator feature works. To change this, you can use the shortcut “Start in” field or use cd /d to change directories.