How to Open Command Prompt in Windows 10

Last updated on November 13th, 2026 at 11:36 pm

To open Command Prompt in Windows 10, select Start, type cmd, and select Command Prompt. Or press Windows + R, type cmd, and press Enter. To run it as administrator, select Run as administrator in the search results.

Applies to: Windows 10. On a Windows 11 PC, follow how to open Command Prompt in Windows 11 instead, since some shortcuts there open Terminal.

Open Command Prompt

Pick whichever way is quickest for you:

  • Start search: select Start, type cmd, and select Command Prompt.
  • Run box: press Windows + R, type cmd, and press Enter.
  • Start menu: select Start > Windows System > Command Prompt.
  • File Explorer: go to a folder, select the address bar, type cmd, and press Enter. Command Prompt opens in that folder. To start at the top of drive C, open the C drive first.
  • Task Manager: press Ctrl + Shift + Esc, select File > Run new task, type cmd, and select OK.

The Windows + X menu shows Windows PowerShell by default. To show Command Prompt there instead, go to Settings > Personalization > Taskbar and turn off Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows key + X.

Open Command Prompt as administrator

Some commands, such as sfc /scannow, need administrator rights. Showing a saved Wi-Fi key is another example, as you’ll see when you find stored passwords on Windows 10 with CMD.

  1. Select Start and type cmd.
  2. Select Run as administrator in the right pane.
  3. Select Yes in the User Account Control box. The window title starts with Administrator.
Windows 10 Start search results for cmd with Command Prompt selected and Run as administrator highlighted
Select Command Prompt (1), then Run as administrator (2).

Two quicker ways: in the Run box, type cmd and press Ctrl + Shift + Enter instead of Enter. Or in Task Manager, select File > Run new task, type cmd, and check Create this task with administrative privileges.

The same tricks work for other apps, and there are more ways to run as administrator in Windows 10.

What can I do with Command Prompt?

For example, run an SFC scan to repair Windows files or find your IP address with ipconfig. Programmers also use it to check and switch which Java version Windows runs with java -version and where java. A quick first command to try is systeminfo, which can show when Windows 10 last started.

How do I copy and paste in Command Prompt?

In Windows 10, Ctrl + C and Ctrl + V work as usual. You can also right-click to paste. To copy, drag over the text to select it and press Enter or Ctrl + C.

To run the same commands again later, save them in a batch (.bat) file. Command Prompt also includes curl for downloading and testing web addresses, so you can use curl on Windows 10 without installing anything else. Another handy job is to print a list of files in a folder.

Microsoft’s command references for cmd and cd list every option. Programmers use a special version of it, the Developer Command Prompt, to compile and run a C program in Windows 10.

Pin Command Prompt or make a shortcut

If you use Command Prompt often, keep it one click away.

  • Taskbar or Start: select Start, type cmd, right-click Command Prompt, and select Pin to taskbar or Pin to Start.
  • Desktop: right-click an empty part of the desktop, select New > Shortcut, type cmd.exe, select Next, name it, and select Finish.
  • Always as administrator: right-click the desktop shortcut, select Properties, then Advanced on the Shortcut tab, and check Run as administrator.

Change folders with cd

Use the cd command to move between folders.

  1. To go into a folder, type cd and the folder name, such as cd Documents, and press Enter.
  2. To go up one folder, type cd ...
  3. To switch to another drive and folder, type cd /d D:\Projects. You can also type just the drive letter, such as D:.
  4. To go to the top of the current drive, type cd \.
Windows 10 Command Prompt window showing cd commands to change folders and drives
Go into a folder (1), go up a folder (2), and switch drives (3).

Folder names with spaces work without quotes. Type dir to list what’s in the current folder. To run a command on a particular file, copy the file’s full path in File Explorer and paste it at the prompt, keeping the quotation marks when the path has spaces. The same prompt can also open .gz files with the built-in tar command.

Open Command Prompt when Windows won’t start

If Windows fails to start twice in a row, it opens the recovery screen. Select Troubleshoot > Advanced options > Command Prompt. You can also start from a Windows 10 installation USB and press Shift + F10 on the first Setup screen. In both cases, drive letters may differ from normal, so check with dir C: and dir D: before running commands.

What’s the difference between Command Prompt and PowerShell?

Both run commands. PowerShell is newer and can do more, but most basic commands, such as cd and dir, work in both. One practical difference shows up with npm tools: PowerShell may block them with a “running scripts is disabled” error, which is why the steps to install the Angular CLI on Windows 10 use Command Prompt.

Close Command Prompt

Type exit and press Enter, or close the window.

Access denied or a window that closes

  • A command says “Access is denied.” Close the window and open Command Prompt as an administrator.
  • Command Prompt opens and closes right away, or says it has been disabled. On a work PC, your administrator may block it. On a home PC, run a full scan in Windows Security, since some malware disables it.
  • The text is tiny. Hold Ctrl and scroll the mouse wheel, or right-click the title bar and select Properties > Font.