How to Open Command Prompt

Open Command Prompt to Execute Commands in Windows 10, 8, 7, Vista, and XP

Screenshot of the Command Prompt in Windows 10
Command Prompt (Windows 10).

Command Prompt is one of the command-line interface programs used to execute commands in Windows operating systems.

Some popular Command Prompt commands you might have heard of include ping, netstat, tracert, shutdown, and attrib, but there are many more. We have a complete list here.

While Command Prompt probably isn't a tool most of you will use on a regular basis, it can really come in handy now and then, maybe to troubleshoot a specific Windows problem or to automate some kind of task.

Note: How you open Command Prompt differs between Windows versions, so you'll find steps below for Windows 10, Windows 8 or Windows 8.1, and Windows 7, Windows Vista, or Windows XP. See What Version of Windows Do I Have? if you're not sure.

Time Required: Opening Command Prompt will probably only take you several seconds, no matter what version of Windows you're using, and much less once you learn how to do it.

Open Command Prompt in Windows 10

Screenshot showing how to open Command Prompt in Windows 10
Opening Command Prompt in Windows 10.
  1. Tap or click the Start button, followed by All apps.
    1. If you're not using the Desktop in Windows 10, tap the All apps button on the bottom-left of your screen instead. It's the icon that looks like the small list of items.
    2. Tip: The Power User Menu is a much faster way to get to Command Prompt in Windows 10 but only if you're using a keyboard or mouse. Just choose Command Prompt from the menu that appears after pressing WIN+X or right-clicking on the Start button.
  2. Find the Windows System folder from the list of apps and tap or click it.
  3. Under the Windows System folder, click or tap Command Prompt.
    1. Command Prompt should open immediately.
  4. You can now execute whatever commands in Windows 10 you'd like to run.

Open Command Prompt in Windows 8 or 8.1

Screenshots showing how to open Command Prompt in Windows 8
Opening Command Prompt in Windows 8.
  1. Swipe up to show the Apps screen. You can accomplish the same thing with a mouse by clicking on the down arrow icon at the bottom of the screen.
    1. Note: Prior to the Windows 8.1 update, the Apps screen can be accessed from the Start screen by swiping up from the bottom of the screen, or right-clicking anywhere, and then choosing All apps.
    2. Tip: If you're using a keyboard or mouse, a really quick way to open a Command Prompt window in Windows 8 is via the Power User Menu - just hold the WIN and X keys down together, or right-click on the Start button, and choose Command Prompt.
  2. Now that you're on the Apps screen, swipe or scroll to the right and locate the Windows System section heading.
  3. Under Windows System, tap or click on Command Prompt.
    1. A new Command Prompt window will open on the Desktop.
  4. You can now execute whatever command you needed to run.
    1. See our List of Windows 8 Command Prompt Commands for a complete list of the commands available via Command Prompt in Windows 8, including short descriptions and links to more in-depth information if we have it.

    Open Command Prompt in Windows 7, Vista, or XP

    Screenshots showing how to open Command Prompt in Windows 7
    Opening Command Prompt in Windows 7.
    1. Click on Start (Windows XP) or the Start button (Windows 7 or Vista).
      1. Tip: In Windows 7 and Windows Vista, it's a bit faster to enter command in the search box at the bottom of the Start Menu and then click Command Prompt when it appears in the results.
    2. Click All Programs, followed by Accessories.
    3. Choose Command Prompt from the list of programs.
      1. Command Prompt should open right away.
    4. You can use Command Prompt to execute commands.
      1. Here's our List of Windows 7 Commands, List of Windows Vista Commands, and List of Windows XP Commands if you need a command reference for any of those versions of Windows.

    The CMD Command, Elevated Command Prompts, & Windows 98 & 95

    In any version of Windows, Command Prompt can also be opened by executing the cmd run command, which you can do from any Search or Cortana field in Windows, or via the Run dialog box (you can open the Run dialog box with the Win+R keyboard shortcut).

    In versions of Windows released before Windows XP, like Windows 98 and Windows 95, Command Prompt does not exist. However, the older and very similar MS-DOS Prompt does. This program is located in the Start Menu, and can be opened with the command run command.

    Some commands, like the sfc command that's used to repair Windows files, require that Command Prompt be opened as an administrator before they can be executed. You'll know if this is the case if you get a "check that you have administrative rights" or "... command can only be executed from an elevated command prompt" message after trying to execute the command.

    See How to Open an Elevated Command Prompt for help starting Command Prompt as an administrator, a process that's a bit more complicated than what's outlined above.