Is it possible to open the command prompt with Windows 7 with a shortcut key, and if it is, how do you do it?

I know that I can assign a shortcut key to it, but does Windows come with a shortcut key already?

I know in that in Ubuntu, with the Unity desktop environment at least, you can press Ctrl + Alt + T.

  • 2
    In Linux there may be no such shortcut key, depending on desktop environment. In fact, there rarely is one (except Alt+F2, entering something like xterm or another terminal emulator and pressing Enter, but this is analogous to Windows' WinLogo+R, cmd, Enter).
    – Ruslan
    Mar 14, 2014 at 12:37
  • @Ruslan I should have said the flavour... I am using Debian 12.04 LTS
    – Dozer789
    Mar 14, 2014 at 22:59
  • You must mean Ubuntu 12.04 LTS. There's no such thing as Debian LTS, nor such versions as 12.04 for Debian.
    – Ruslan
    Mar 15, 2014 at 4:07
  • @Ruslan Sorry, I don't why I said Debian... I meant Ubuntu.
    – Dozer789
    Mar 17, 2014 at 23:13
  • Shift + F10 for windows 7 installation interface. So you can run command like diskpart before installation process.
    – Nick Dong
    Feb 6, 2018 at 12:43

17 Answers 17


For normal prompt, follow these steps:

  • WinKey+R
  • Input "cmd".
  • Enter

For elevated (administrator) prompt, follow these steps:

  • WinKey (Start Menu opens on the left-bottom corner)
  • Input "cmd".
  • Ctrl+Shift+Enter

You can, of course, create a special shorcut for your computer, but memorizing the above keys should be useful because they work on every vanilla (untouched) Windows version (NT, XP, Vista, 7, 8, 8.1... even Win98 or 95, if you still use them), and, as far as I know, flavour (Home, Pro, Server, Premium, Ultimate... etc).

EDIT May 2016: Checked working on Windows 10.

  • 4
    +1 This is the best method IMO. Simple, allows for elevated, and works on stock installations.
    – Ron
    Mar 14, 2014 at 10:04
  • 3
    It seems the ctrl+shift+enter trick doesn't work on Win8.1 though... But there you can select it directly from the menu-popup that's brought up by pressing win+x.
    – deroby
    Mar 14, 2014 at 12:44
  • I have just tested it working fine on Windows 8. Don't know about v8.1 yet. Mar 14, 2014 at 13:10
  • 3
    @SopalajodeArrierez turns out to be my own mistake off course. I re-read the issue and then realized that out of habit I pressed Winkey + R, then typed cmd and pressed shift-enter, thus starting it via the "Run"-box. This does not work indeed. Pressing just Winkey and typing cmd starts it via the "Search" and this one does indeed recognize the shift-enter. Sorry for the confusion!
    – deroby
    May 2, 2014 at 16:56
  • 1
    With Windows 8, 8.1, and 10, you can now use the Admin menu. Press Win+X, A to start the Admin Command Prompt / Admin Power Shell Nov 17, 2016 at 18:52

Easy as. You just need to create a shortcut to the command prompt somewhere to allow you to apply the hotkey combination to it. Here's one way to do it.

  • Hit the Windows button
  • In Search programs and files, type cmd
  • When cmd.exe is found, right-click on it and go Pin to start menu
  • Close and reopen the start menu (or just press Esc)
  • Right click on your new pinned shortcut and choose Properties
  • On the shortcut tab, you will find a field called Shortcut key
  • Select that field and set the key combination you want to use
  • Press OK

Job done!

  • That is what I was talking about... I know I can set the hot key for it, I was just wondering if there was a pre-set one.
    – Dozer789
    Mar 14, 2014 at 0:39
  • 5
    No, there is no preset one. Mar 14, 2014 at 0:40
  • This is the best way to do it. +1, but someone gave it a -1
    – Devid
    Mar 14, 2014 at 0:45
  • I am thinking that setting a shortcut for it is the best way for doing it. +1 from me!
    – Dozer789
    Mar 14, 2014 at 0:46
  • 1
    @MooingDuck: Haha, you're right. That's what I do as well (Win-R, cmd, enter). I do it so frequently that in my brain, I thought Win-R WAS a shortcut to Cmd. My mistake. :-)
    – loneboat
    Mar 14, 2014 at 22:54

Click Start, and type cmd. Right click the icon, and click Pin to Taskbar. Then, depending on its position, you can press Win + 1-9, depending on its position from the Start orb.

  • This is what I would do. I like that feature. It was even added to Ubuntu. Mar 14, 2014 at 4:56
  • Perfect!!! It reopens/re-focuses on the current command prompt session, instead of spawning a new one, as in this answer. Jan 13, 2015 at 14:41

Use AutoHotKey for this.

Example(CTRL + Alt + T):

Run %comspec% /k

Note: comspec is a built-in variable that resolves to C:\Windows\system32\cmd.exe on a typical system.


In Windows 7 there's also a convenient way to create a command line window pointing to a folder that is currently open in explorer: Shift + Right-click in that folder and select "Open command window here":
convenient way to create a command line window pointing to a folder
See this sevenforums post for more examples of Shift changing default behavior.

  • 7
    Even better, in the address bar type cmd Mar 14, 2014 at 15:09
  • Shift+Right click offers this option on desktop as well. Mar 14, 2014 at 17:14
  • Also works in Windows 8 / 8.1
    – user11153
    Apr 8, 2014 at 10:50
  • Not only cmd: you can use the explorer address bar as a command line input. So you can open any file (with a opening way defined) in any folder in %PATH%, not only .exe but also .bat, .ps1 or even .txt, etc. The selected folder will be the working directory and also any file arg will be looked for there. Just like in cmd. Not much people uses this or even know it. Two cons; if the file is not found, the explorer address bar will try to search the text in your default browser; and if you run a console program you usually can't see the result because the window closes.
    – cdlvcdlv
    Jan 7, 2018 at 17:29

The best way !(no typing and no clicking just shortcut key)

  1. Make a shortcut of this cmd.exe file at desktop
  2. Go to the shortcut's properties and there will be a space for shortcut-key ... input any key of your choice (lets say c) then the shortcut key turns to ctrl + alt + c.
  3. Now test it out anywhere!

Another way out (this has 2 key combo)

  1. drag cmd.exe to just beside the windows orb at bottom-left corner of your screen (by default the orb is there)
  2. press winkey + 1(yeah! the key with windows logo and the number 1)

UPDATE (15-apr-2020 on up to date windows 10): it still works

P.S : and the best part of this is that you can have programs which can open with shortcut keys of your choice!


Win8+ method:

Win+X, C: CMD

Win+X, A: CMD as admin

FYI: I am aware the question requested a solution on Win7, but I thought this solution was too good NOT to share! :)

  • 1
    Works in Win10!
    – Marslo
    Aug 24, 2017 at 10:20
  • Doesn't in W10 - Italian (Win+i run powershell, Win+a run admin powershell)
    – DDS
    Oct 22, 2019 at 16:00
  • @DDS Yes Win10 v1809 (build 17763) or earlier Microsoft replaced PowerShell instead of Command-Prompt. Switch back: right-click Taskbar, Taskbar settings, toggle this entry OFF: 'Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows key+X.'
    – gregg
    Oct 23, 2019 at 21:00
  • The issue isn't powershell, the issue is that in Italian "C" and "A" arn't the underlined letter, so the press win+x then C/A does not work because the involved letters are different. Anyway thanks for suggestion on how to restore CMD as default command prompt.
    – DDS
    Oct 24, 2019 at 13:15

In Windows, any link (.lnk) can have a hotkey assigned. Create a link to cmd.exe, go to its properties and set the hotkey.

Or you can pin any program to a task panel and start it with Win+(digit) combination. Win+1 will start the first icon on the task panel, Win+2 - the second one and so on.


You can use AutoHotkey to make a keyboard shortcut for the command prompt and set it to any key combination you want. It's easy to set up and use.


Windows does not come with a shortcut key to the command prompt. The closest thing would be the extended context menu (Shift + Right-click) on the Desktop or perhaps just Win + R and then running cmd.

  • How do I add one of those to the cmd?
    – Dozer789
    Mar 14, 2014 at 0:33
  • On Windows 7, Shift + Right-click on the Desktop should give you an option that says "Open command window here." If you'd like a right-click option to be available anywhere, I've found Ultimate Windows Context Menu Customizer to be helpful.
    – Matt
    Mar 14, 2014 at 0:35
  • That Ultimate Windows Context Menu Customizer looks useful. I'll look into that.
    – Dozer789
    Mar 14, 2014 at 0:41

If you are a keyboard guy, you will like Launchy.

Launchy indexes the entries in the start menu (configurable, other places are possible too). Now, you hit Alt+SPACE and the Launchy window opens.

Type cmd and the console opens.

IMO a much more natural way to start applications (by their name) than Autohotkey.

  • 1
    It's quite unnatural to install a special tool to run an executable in %PATH%. WinLogo+R can do this, and it's available by default.
    – Ruslan
    Mar 14, 2014 at 12:40
  • 1
    Yep. Things get interesting when you want to start something not in %PATH%. Or if you not only want to start an executable but for example open a word document, calculate something quickly etc. Launchy handles all that. Give it a try. Once you've used it you'll never want to miss it again -- if you're a keyboard guy. If you're fine with clicking through the explorer, Launchy is not for you.
    – eckes
    Mar 14, 2014 at 12:44
  • 1
    It's overkill for the OP's question. As for myself, I don't use Windows, I'm happy with Yakuake @ Linux :)
    – Ruslan
    Mar 14, 2014 at 12:48
  • @Ruslan: yep. Solves more that OPs problem. Give a man a fish... you know?
    – eckes
    Mar 14, 2014 at 12:50

Not quite a shortcut key, but still only a mouse-click and 4 keystrokes away: Since Vista, in File Explorer editing the "breadcrumbs" address and overwriting it with cmd and pressing Enter will start cmd.exe and a bonus: it starts it in the folder you're currently displaying.


Simply type cmd into the address bar of an explorer window. It will open a command window in the current location.


As an alternative to typing "cmd" in an explorer window: If you always want to open a command prompt in a specific folder, then you can use a simple .bat file on your desktop: "@echo off echo Any text F: CMD /K CD F:" The "F:" is required if the disc is not "C:"


I have a collection of productivity tools. You can find how do I open cmd window at Open Command Window:

If Win+c is pressed in windows explorer, the opened command line window will use the same path in the windows explorer as the current directory

If you don't want to get the whole rwin package. The closest is to put the cursor in windows explorer and type in "cmd" to get the command window in the current directory.


It is better to:

  • Create a custom shortcut of CMD.EXE on the desktop
  • Go to properties of shortcut you have created
  • Assign a custom key to whatever you want in the shortcut key textbox
  • Press the shortcut key on the keyboard, and it starts opening

Depending on what you are looking for, the simplest method is hit Ctrl-M with the explorer window open. A power shell command prompt opens on the directory where you are working at.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .