The cmd shortcut key is a short sequence: press Win + R to open the Run box, type cmd, and press Enter. Command Prompt opens at once. To open it with administrator rights, press Ctrl + Shift + Enter instead of Enter.
Windows 11 also offers Terminal, which hosts Command Prompt and PowerShell in tabs. Win + X followed by I opens it. Inside the black window, a handful of keys such as Up for the last command and Tab to complete names save a lot of typing.
Quick facts
Open cmd
Win + R, cmd, EnterAs administrator
Win + R, cmd, Ctrl + Shift + EnterTerminal (Windows 11)
Win + X, then IIn a folder
Type cmd in the File Explorer address barStop a command
Ctrl + CPrevious command
Up
CMD shortcut key and other ways to open it
| Method | Keys |
|---|---|
| Run box | Win + R, cmd, Enter |
| Run box, as administrator | Win + R, cmd, Ctrl + Shift + Enter |
| Start search | Win, type cmd, Enter |
| Start search, as administrator | Win, cmd, Ctrl + Shift + Enter |
| Terminal in Windows 11 | Win + X, then I |
| Terminal as administrator | Win + X, then A |
Open Command Prompt in a folder
In File Explorer, open the folder you want, click the address bar (or press Alt + D), type cmd and press Enter. Command Prompt starts already pointing at that folder, so you do not need to type long paths. In Windows 11 you can also right click inside the folder and choose Open in Terminal.
Keys inside Command Prompt
| Keys | What it does |
|---|---|
| Up | Bring back the previous command |
| F7 | List of earlier commands to pick from |
| Tab | Complete a file or folder name |
| Ctrl + C | Stop a running command |
| Ctrl + V | Paste (Windows 10 and 11) |
| Esc | Clear the current line |
| cls, then Enter | Clear the screen |
| exit, then Enter | Close the window |
Useful commands for everyday problems
| Command | Use |
|---|---|
| ipconfig | See your IP address and network details |
| ping 8.8.8.8 | Check if the internet connection works |
| sfc /scannow | Check and repair Windows files (administrator) |
| shutdown /s /t 0 | Shut down at once |
| dir | List files in the current folder |
The shutdown command is also the basis for one key shutdowns; see the shutdown shortcut key guide.
When cmd does not open
| Problem | Fix |
|---|---|
| Run box opens nothing | Check the spelling cmd and press Enter |
| Blocked by administrator | Work computers may block it; ask IT |
| Opens PowerShell instead | That is Terminal's default; open a Command Prompt tab with its drop down |
| Commands say access denied | Open it as administrator with Ctrl + Shift + Enter |
Terminal on a Mac
On a Mac, press Command + Space, type terminal and press Return. The Run box itself has more uses; see the Run command shortcut. Opening system tools such as Task Manager and Control Panel also has quick keys.
Frequently asked questions
What is the shortcut key for Command Prompt?
How do I open cmd as administrator?
In the Run box, type cmd and press Ctrl + Shift + Enter.
What is the shortcut for Terminal in Windows 11?
Can I bring back a command I typed earlier?
Yes. Up steps back through earlier commands, and F7 shows a list to pick from.
How do I stop a command that is running?
Press Ctrl + C.
How do I open cmd in a specific folder?
Type cmd in that folder's File Explorer address bar and press Enter.