53

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.

Eric Wilson
  • 8,068
Dozer789
  • 633

17 Answers17

84

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.

31

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!

25

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.

Canadian Luke
  • 24,640
13

Use AutoHotKey for this.

Example(CTRL + Alt + T):

^!t::
Run %comspec% /k
return

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

stderr
  • 10,569
  • 2
  • 36
  • 50
11

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.

bizzz
  • 253
10

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!

6

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! :)

gregg
  • 6,307
2

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.

techraf
  • 4,952
1

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.

Keltari
  • 75,447
0

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:"

Phil
  • 11
0

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.

Matt
  • 245
0

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.

eckes
  • 538
0

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.

Mark Hurd
  • 419
0

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

felwithe
  • 933
-1

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.

Codism
  • 953
-2

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.

-2

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
Vikash
  • 1