How to open Command Prompt (14 ways)

tutorial
How to open Command Prompt (14 ways)
Command Prompt is a powerful tool for running commands, executing scripts, and performing advanced tasks in Windows. Whether you’re troubleshooting issues, automating processes, or simply prefer the command-line experience, it’s useful to know different methods for launching cmd. In this guide, you’ll discover fourteen ways to open Command Prompt, from classic options like the Run window and desktop shortcuts to more handy solutions involving cmd keyboard shortcuts. Read on and choose the methods that fit you best:
NOTE: This guide covers both Windows 10 and Windows 11. Where a procedure is identical, or things look almost identical, I use screenshots taken in Windows 11. Where things are different, I share screenshots for both operating systems.

How to open Command Prompt with a shortcut

If you’re reading this article, there’s a high chance you’re mainly looking for a way to open Command Prompt using either a keyboard shortcut or a clickable desktop shortcut. Here are a couple of methods to do that:

1. Create a Command Prompt shortcut on the desktop (point it to cmd)

If you like using shortcuts, then you should create a shortcut to the Command Prompt. Right-click or press and hold on an empty space on your desktop or any other folder, go to New in the contextual menu, and click or tap Shortcut.
Right-click on the desktop and choose New > Shortcut
Right-click on the desktop and choose New > Shortcut Then, in the Create Shortcut wizard, copy and paste or type this command in the location field:
cmd
… and press Next.
Type cmd as the shortcut location
Type cmd as the shortcut location Give the CMD shortcut a name, like Command Prompt or Old-School Shell 🙂, and save it by pressing the Finish button.
Choose a name for the Command Prompt shortcut
Choose a name for the Command Prompt shortcut You can now easily open CMD in Windows 10 and Windows 11 without using the keyboard: just double-click or double-tap the Command Prompt shortcut.
The Command Prompt shortcut
The Command Prompt shortcut TIP: Alternatively, you can download our collection of shortcuts and use what we have created: Download the largest collection of Windows desktop shortcuts for free!. In this pack, there are also plenty of other useful shortcuts to download and use.

2. Use a keyboard shortcut to open Command Prompt

Once you have a desktop shortcut for Command Prompt (as shown in the previous method), you can edit its properties to set a custom keyboard shortcut for opening Command Prompt. Here’s how: Right-click or press-and-hold your Command Prompt desktop shortcut, and choose Properties.
Open the Properties of the Command Prompt shortcut
Open the Properties of the Command Prompt shortcut In the Shortcut tab, click or tap inside the Shortcut key field and press the key combination you want (for example, Ctrl + Alt + C). Then, click or tap OK.
Set a keyboard combo for the Command Prompt shortcut
Set a keyboard combo for the Command Prompt shortcut From now on, you can press that keyboard shortcut to launch Command Prompt anytime you want. TIP: For more details on how to set custom keyboard shortcuts to desktop shortcuts, read this tutorial about creating and customizing desktop shortcuts in Windows.

3. Open Command Prompt using the Run window (keyboard shortcut: Win + R)

One of the quickest ways to go straight to Command Prompt in Windows 11 and Windows 10 is via the Run window. This is how it works: Press the Win + R on your keyboard to bring up the Run window.
Use the Windows + R keyboard shortcut
Use the Windows + R keyboard shortcut In the Open field, type:
cmd
…and press Enter on your keyboard or click/tap OK.
Type cmd and press Enter or OK
Type cmd and press Enter or OK The Command Prompt window will then immediately appear on your screen.

How to open Command Prompt from Start

Do you like opening apps from the Start Menu or the WinX menu? If you do, here’s how to get Command Prompt from there:

4.1. Open Command Prompt from the Start Menu in Windows 11

On a Windows 11 PC, you can also launch Command Prompt from the Start Menu. Open the Start Menu and click or tap the All button in the top-right corner.
Click or tap the All button in the Start Menu
Click or tap the All button in the Start Menu Then, scroll down until you find the Windows Tools shortcut and click or tap it.
Click or tap Windows Tools
Click or tap Windows Tools In the Windows Tools window, there’s a Command Prompt shortcut. Double-click or double-tap it, and your favorite command-line app opens.
Double-click the Command Prompt shortcut
Double-click the Command Prompt shortcut Note that if you want to run Command Prompt as an administrator, you can right-click its shortcut and choose Run as administrator instead.
Running CMD as admin from Windows Tools
Running CMD as admin from Windows Tools

4.2. Open Command Prompt from the Start Menu in Windows 10

If you’re using a Windows 10 PC, open the Start Menu, scroll down the list of apps, and go to the Windows System shortcuts folder. You’ll find a Command Prompt shortcut there: click or tap it to open CMD.
The Command Prompt shortcut in Windows 10's Start Menu
The Command Prompt shortcut in Windows 10's Start Menu If you want to launch Command Prompt as an admin, right-click or press and hold the shortcut, then go to More, and finally, click or tap Run as administrator. Or just keep the Ctrl and Shift keys pressed and click or tap on the Command Prompt shortcut to launch CMD as admin.
Launch Command Prompt as administrator in Windows 10
Launch Command Prompt as administrator in Windows 10

5. Open Command Prompt using the WinX menu (Windows + X)

You can also right-click (or press and hold) the Start button to open the WinX menu (often called the “power user menu”). By default, Windows 11 shows the Terminal instead of Command Prompt, and you can’t change that. However, you can run Command Prompt from within Windows Terminal: see the 10th method in this guide.
The Terminal in the WinX menu of Windows 11
The Terminal in the WinX menu of Windows 11 If you’re using Windows 10, it shows Powershell instead of Command Prompt by default.
The Windows PowerShell options in Windows 10's WinX menu
The Windows PowerShell options in Windows 10's WinX menu There are two ways you can approach the situation in this operating system: customize the WinX menu to show cmd or run Command Prompt from within Windows Terminal. For the latter, check out the 10th method in this tutorial. For the former, follow the steps in this guide: How to show CMD, PowerShell & Control Panel in the Windows 10 WinX menu. In short, open Settings (Win + I), go to Personalization > Taskbar, and turn off the switch of the setting that says “Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press the Windows key+X.”
Make WinX show Command Prompt in Windows 10
Make WinX show Command Prompt in Windows 10 You can then use any of the following keyboard shortcuts to launch Command Prompt:
Win + X, then C for Command Prompt Win + X, then A for Command Prompt as Admin
The WinX Command Prompt shortcuts in Windows 10
The WinX Command Prompt shortcuts in Windows 10 You can also simply click or tap the Command Prompt option you prefer in the WinX menu.

How to open Command Prompt from the taskbar

The taskbar is also a good choice to launch Command Prompt. Here’s what to do:

6. How to open Command Prompt fast using search

Both in Windows 11 and Windows 10, one of the fastest ways to open Command Prompt is to search for it. In either operating system, click or tap the search field on the taskbar or use this keyboard shortcut if you prefer:
Windows + S
Then, type cmd and press Enter or click/tap the Command Prompt result.
Search cmd to open Command Prompt
Search cmd to open Command Prompt If you want to launch Command Prompt as administrator, use the Run as administrator link from the right side of the search panel. Alternatively, you can right-click (or press and hold if you use a touchscreen) on the Command Prompt search result and then choose Run as administrator.
Run CMD as administrator from search
Run CMD as administrator from search CMD will then launch in an instant.

7. Pin Command Prompt to your taskbar (or Start Menu)

If you prefer to have a clean desktop, pin the Command Prompt to the taskbar or the Start Menu. In either Windows 11 or Windows 10, search for CMD, and on the right of the search box, select Pin to taskbar. If you’d rather have it on the Pinned section of your Start Menu, click or tap Pin to Start.
Pin Command Prompt to the taskbar or to Start
Pin Command Prompt to the taskbar or to Start From now on, use the shortcut that you have pinned to open Command Prompt. Furthermore, if you want to run Command Prompt as administrator, use the right-click menu of the shortcut pinned on your taskbar or Start Menu, and click/tap the Run as administrator option from it.
Run CMD as admin from the taskbar
Run CMD as admin from the taskbar

How to open Command Prompt before Windows boots

Sometimes, you need to troubleshoot or repair issues that prevent Windows from loading correctly. In such cases, you can open Command Prompt before Windows fully boots or even when it’s not installed on your computer at all. Here’s how:

8. How to open Command Prompt while installing Windows 11 or Windows 10

This method of opening the Command Prompt works when Windows 11 or Windows 10 isn’t installed on your computer. It also works when your Windows is corrupted and can’t boot properly. Use a Windows 11 or Windows 10 installation media (like an USB stick with the Windows Setup) to boot your computer or device. When the setup wizard shows up, use this Command Prompt keyboard shortcut:
Shift + F10
…and Command Prompt pops up on your screen.
Press Shift + F10 to open Command Prompt when installing Windows
Press Shift + F10 to open Command Prompt when installing Windows It’s as simple as that! 🙂

9. How to open Command Prompt when you boot Windows 11 or Windows 10 (using the Advanced Startup Options)

If you need to run advanced commands in Command Prompt, and Windows is installed on your PC but no longer works properly, you might need a way to open CMD at boot, before the operating system loads itself completely. To do that, there are a couple of alternative paths you can follow, and their steps are all detailed in this tutorial: How to open Command Prompt when Windows doesn’t boot (3 ways).
Open Command Prompt from the recovery environment
Open Command Prompt from the recovery environment You can then use CMD to do anything you want, including advanced tasks such as boot repairs or partition management with diskpart, for instance.

Other ways of opening Command Prompt in Windows

Up until now, I talked about the most common ways to launch Command Prompt. There are more, though. Next, I’ll show some less popular and more “specialized” methods to run CMD in Windows. Keep in mind that they’re not ordered in any particular way:

10. How to open Command Prompt from the Windows Terminal

The Terminal app offers another easy way to open CMD in Windows. The Terminal is part of Windows 11, so you can simply launch it in this operating system. However, if you’re using Windows 10, you first have to download and install it, and only then can you open the Terminal. Either way, when you start the Windows Terminal, it loads a PowerShell tab. But you can also open CMD in the Terminal by clicking the Open a new tab button (shaped like a downward-pointing caret) and then selecting Command Prompt from the menu.
Open Command Prompt in Windows Terminal
Open Command Prompt in Windows Terminal TIP: Alternatively, you can open a Command Prompt tab in Windows Terminal using the Ctrl + Shift + 2 keyboard shortcut.

11. How to open Command Prompt from File Explorer’s address bar

You can also open Command Prompt using the address bar from File Explorer. All you have to do is type cmd in the address bar and press Enter. Then, a Command Prompt instance opens immediately, using the path of the current folder.
Type cmd to run Command Prompt from File Explorer
Type cmd to run Command Prompt from File Explorer For more details, read this tutorial: How to run commands from Windows’ File Explorer. Unfortunately, you cannot open Command Prompt as an administrator using this method.

12. Open Command Prompt using its cmd.exe executable file

Another way to open Command Prompt using its cmd.exe file. Open File Explorer, navigate to the Windows partition, open the Windows folder, and then access System32. There, you’re going to find cmd.exe - the executable file used by Command Prompt. The full path, if you need it, is:
C:\Windows\System32\cmd.exe
The cmd.exe file in Windows
The cmd.exe file in Windows Furthermore, the easiest way to open CMD as an administrator is to right-click the file (or press and hold it if you have a touchscreen) and then click/tap on the Run as administrator option from the context menu.
Use the cmd.exe file to run Command Prompt as admin
Use the cmd.exe file to run Command Prompt as admin

13.1. Open Command Prompt from the Task Manager in Windows 11

You can also open Command Prompt using the Task Manager. If you’re using Windows 11, a quick way of accessing the Task Manager is to use this keyboard shortcut:
Ctrl + Shift + Esc
Then, click or tap Run new task in the top-right area of the Task Manager. It doesn’t matter what tab you’re on: the Run new task button is shown on all of them.
Run new task in Windows 11's Task Manager
Run new task in Windows 11's Task Manager In the Open field from the Create new task window, input this command:
cmd
Next, mark the checkbox “Create this task with administrative privileges” if you want to run Command Prompt as administrator. Then, click OK or press Enter on your keyboard.
Type cmd and press OK or Enter
Type cmd and press OK or Enter Windows 11 will then immediately start the Command Prompt.

13.2. Run Command Prompt from the Task Manager in Windows 10

In Windows 10, you can launch the Task Manager using the same keyboard shortcut:
Ctrl + Shift + Esc
If the Task Manager opens up in its compact view mode, click or tap More details. Then, open the File menu, and click or tap Run new task.
Choose Run new task in Windows 10's Task Manager
Choose Run new task in Windows 10's Task Manager In the Create new task window, type:
cmd
In case you’d rather open Command Prompt as admin, enable the “Create this task with administrative privileges” option. Then, click/tap OK or press Enter on your keyboard.
Input cmd and press Enter or OK
Input cmd and press Enter or OK The Command Prompt will launch in an instant.

14. How to open the Command Prompt from Microsoft Edge

A cumbersome and unrecommended method to launch Command Prompt in Windows is to use the Microsoft Edge web browser. Launch Microsoft Edge and enter this command in the address bar:
file://C:/Windows/System32/cmd.exe
Then, press Enter.
Type this path in the browser's address bar
Type this path in the browser's address bar In the download dialog that opens up, click or tap the Open button.
Click or tap Open
Click or tap Open This method only opens Command Prompt windows with standard user rights, not administrative privileges. Furthermore, the starting path of CMD is the temporary internet files location assigned by Windows to your user account, which may not be something you want.
The Command Prompt launches
The Command Prompt launches That was all!

How do you like to open the Command Prompt?

As you can see, there are plenty of ways to start Command Prompt in Windows 11 and Windows 10. Which ones you end up using most will depend on your habits, preferences, and the tasks you perform. Whether you prefer quick cmd keyboard shortcuts, desktop shortcuts, or something else, there’s a method here for you. If you know any other unique methods or shortcuts to launch Command Prompt, feel free to share them, and happy command-lining!
Discover: Productivity Accessibility Apps CMD Recommended Tutorials Windows

Discussion (33)

  1. Steve J
    Steve J

    With CMD.exe as an icon on the task bar at (say) the first position, open it by pressing the Win-Key and the number 1.

  2. Parth Daave
    Parth Daave

    Also can run cmd prompt via CTRL + R combination and typing cmd there and enter.. boom!

  3. Terry Dean
    Terry Dean

    For #4 cmd within run box, press control-shift-enter keys to open as Administrator

    1. Anonymous
      Anonymous

      Good tip. Thanks for sharing.

    2. Parth Dave
      Parth Dave

      Helpful thanks !!

  4. RAKESH KUMAR JAIN
    RAKESH KUMAR JAIN

    Very Useful Article. Can I execute command like COMP from a directory where
    I have files to compare e.g. CMy Files?

  5. James
    James

    I have an elevated cmd pinned to my taskbar an use it regularly

  6. Jan Knol
    Jan Knol

    Ctrl + Shift + Esc
    file > run new task > “cmd”
    Enter
    only way to run cmd when explorer won’t launch

  7. John
    John

    Does anybody know how to bypass the windows 10 login screen? or how to get to the command run with out login windows 10?

  8. Rhonda hazlip
    Rhonda hazlip

    It brings me to user account control

  9. Haramrit
    Haramrit

    You can also do this:

    If you wish to open CMD in a particular directory, you can type cmd in the address bar in that directory and hit Enter. It automatically opens cmd with the present working directory.

    Hope it helps. 🙂

  10. Larry Ray
    Larry Ray

    So how do old people find Command Prompt (Run As Administrator) in Windows 10 now. Typing “Command Prompt” into Cortana only opens command prompt. How do you got to Run Command Prompt as Administrator?

  11. Jonathan
    Jonathan

    Technically, that’s really only three ways to start CMD; Use exe file, create a shortcut, launch from run box – those are the only universal three which you’ve listed. But there are other ways: Enable hidden Admin account, run from Safe Mode, Run From Disk, or run using 3rd party tool, Task Scheduler, or Task Manager.

  12. David
    David

    From Windows Explorer…
    1.) Navigate to Parent of Folder that you want to open CMD in.
    2.) Press SHIFT and Right Mouse on Folder that you want to open CMD window in. This reveals a drop-down menu.
    3.) Click on “Open command window here”.
    4.) Done.

  13. PhistucK
    PhistucK

    Click on the address bar, enter “cmd” (without the quotes) and press Enter. Done. 🙂

  14. MsDigitalCitizen
    MsDigitalCitizen

    Love the title of this site. Love love love it. I teach ‘digital literacy’ to seniors. Please, people; the ‘duh…’ and ‘stupid question…’ comments truly are not helpful to ANYBODY.

  15. Kenny
    Kenny

    Okay, here’s a challenge.

    I was using Windows7 recovery when it came to last step, i.e. “Setup is starting services”. A new message said Windows can’t do that and click OK to restart.. I did and it began again at the last step. “System is staring services”.
    And again it couldn’t.

    I think I know why. I have used IOBIT’s Advanced System Care for maintenance for quite some time. I also use it’s Turbo Boost feature which shuts down unneccessary services for gaming performance. I fly a flight simulator.

    Apparently I forgot to reset Turbo Boost to “work” mode and the recovery program can’t start them.

    Bottomline is I don’t have a fully functioning OS, can’t access even in safe mode’s , including with the command prompt. Can’t quit the recovery program, can’t set ASC to work mode.

    Any suggestions..

  16. Stan
    Stan

    In File Explorer, point to folder where you want to open command prompt. Hold down shift while right clicking on folder name. Select “Open command window here”.

  17. ye
    ye

    Another method:
    Go to internet explorer and type in “file://C:/Windows/System32/cmd.exe” in the address bar

  18. kalva Ravi Babu
    kalva Ravi Babu

    Step 1) Windows + r (launching run option)
    Step 2) type: c:WindowsSystem32cmd.exe and click enter (in windows family). That launches command prompt.

  19. vijaya sawant
    vijaya sawant

    Directory of C:

    8/22/2011 07:30 AM

    WINDOWS
    8/22/2011 07:35 AM
    Documents and Settings
    9/22/2011 08:57 AM
    Program Files
    9/22/2005 05:43 AM 0 CONFIG.SYS
    9/22/2005 05:43 AM 0 AUTOEXEC.BAT
    7/28/2015 02:17 PM
    Tally.ERP9
    9/22/2011 09:10 AM
    GAMES
    2 File(s) 0 bytes
    5 Dir(s) 12,990,644,224 bytes free

    can i also describe to my personal data* as above personalize language like bytes

  20. geets
    geets

    another tip: if you’re in windows explorer, click in the path (will highlight path) and type cmd and hit enter on keyboard (I know it seems like you overwrite the path, but it won’t after you hit enter.) this will take you to the cmd prompt set to the explorer path. Is a time saver if it is a long path.

    1. praveen
      praveen

      awesome… helpful lot thanks..

    2. Victor Ordu
      Victor Ordu

      Wow, that’s another great tip.

  21. Gilad Tabul
    Gilad Tabul

    Hi! Can’t you also go to Notepad and type in “command.com” and then save the file as a *.bat file?

    1. Ciprian Adrian Rusen
      Ciprian Adrian Rusen

      Yes, you can.

  22. Kareena
    Kareena

    There is one more way that I know of and its great if your on the directory you want to use because it takes it straight to that.

    You just shift + right click on the file/folder you want to use it for, and click the option ‘open command prompt here’.

    Hope that made sense 🙂

    1. Ciprian Adrian Rusen
      Ciprian Adrian Rusen

      Yes, it makes sense and it is a great tip. Thanks for sharing it.

    2. ravi babu
      ravi babu

      this is really helpful

  23. Joe Oloughlin
    Joe Oloughlin

    along with this how about some comment
    about expanding and keeping a bigger
    dos box available

    1. Ciprian Adrian Rusen
      Ciprian Adrian Rusen

      I am not sure I understand very well what you are requesting.

      1. Bamit
        Bamit

        To answer Joe’s comment;
        If the DOS cmd window is already open, then left click the tiny icon of the c: on the upper left of the window. Go to properties then make adjustments under the Layout tab.
        If it is from a shortcut that you created and you want it to always be the same, just right click on the shortcut, goto properties then layout.

    2. K. RAVI BABU
      K. RAVI BABU

      In windows7(accessing command prompt) :
      =>1. click f1(universal help button). It open s a window.
      =>2. Type in search box “open command prompt” and click enter
      =>3. open the link “open a command prompt window” then you get link to open command prompt