Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Windows Vista,


opens cmd.exe

Where can I find a list of all the commands that can be executed there?

Today only I found out about getmac. I used to use ipconfig/all. getmac is so much more convenient.

share|improve this question
Use: where *.exe From:… – Patrick Jul 2 '12 at 10:12
up vote 3 down vote accepted

As others have pointed out, "dir *.exe /s" will find you all the EXEs on the drive, and assuming you have permissions to do so, you can execute all of them directly (so long as you include an absolute path).

And the "help" command gives you a listing of basic MS built-ins.

But assuming you want a real answer, of a) a list of actual commands that b) you don't need full pathnames to run and c) include everything on YOUR system, not just Microsoft's tools, you need to discover it programmatically.

I don't know how to do this in DOS (or CMD), but I can give you the steps.

  1. For each directory in your PATH environment variable,
  2. list all files ending in the extensions listed in the PATHEXT environment variable.

When you type a command, PATH is a list of locations where Windows looks for that command, and PATHEXT is a list of file extensions it will append to that command to match to a file. Both are semicolon-separated lists, and both are searched in order. Here's my system:

PATH=c:\WINDOWS\system32;c:\WINDOWS;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;c:\Perl\bin\;c:\Python24;c:\Python24\bin;c:\WINDOWS\System32\Wbem;c:\Program Files\Common Files\GTK\2.0\bin;c:\bin

You can probably guess I've made some modifications to my system PATH; yours will probably be less cluttered. (Or not; QuickTime and Java can't be the only programs that insist they need to add themselves to my path, so yours probably has some unexpected additions too.)

When I execute, say,

C:\> findstr

.. Windows searches each entry in the PATH variable for a file named "findstr" (case insensitive). It doesn't find that file in the first entry, so it checks for all possible permutations, by appending the extensions listed in PATHEXT to the command name and checking for that file. First it checks for "C:\WINDOWS\system32\", but there's no such file. Next it checks "C:\WINDOWS\system32\findstr.exe" and finds it, so that's the program it runs.

Hopefully I wasn't trying to run "C:\WINDOWS\system32\findstr.bat" or "C:\bin\" -- those files would have been run had I run one of these:

C:\> findstr.bat

... but since I only typed "findstr", I got the .EXE version.

So that's how Windows runs your commands on the commandline. If you want the full list of words you can type there and have run, you'll need to check your own PATH variable for where to look, and your own PATHEXT variable for what extensions to look for.

C:\> set | findstr PATH

(If anyone else wants to chime in with a succinct DOS commandline that will automate this, please weigh in!)

share|improve this answer
What an answer. Upvoted. :) – Alexander Burke Mar 13 '10 at 8:59

In Windows Vista, Start->Run->cmd opens cmd.exe.
Where can I find a list of all the commands that can be executed there?



in the command prompt will give you a survey of the cmd commands, most left from the dos days. However, to get a list of everything that can be started from a cmd prompt (which is .exe, .com, .bat, .cmd and various executable files, like .pyc and so on, you'd have to do

c:\> dir *.exe,*.com,*.bat,*... /s

(this will also get you some browser cookies ending in .com, so ignore those)

share|improve this answer
Uh... I don't think that's what he meant by the second command you have there. – Breakthrough Sep 30 '09 at 22:02
The second command will list every executable file on c:! While certainly you can execute them, only ones on one's path are really relevant when asking "What can I run?" - regular executables should be a given. – Phoshi Sep 30 '09 at 22:22
He asked, and I quote "a list of all the commands that can be executed there". I know I maybe took it too literally, but technically, that's the one :) Anyways, edit the answer if you feel like it. I won't mind. – Rook Sep 30 '09 at 22:50

You can type "help" at the prompt and see most of the built in commands (plus some which are not built in, but are major ones).

That being said, there are a lot of "executables / batch / script" files such as anything ending in .exe, .com, .cmd.

However, I do not believe there is anyway of finding them all unless you just do a dir and pipe in all executables - however I doubt that would be effective.

share|improve this answer

Other commands here:

share|improve this answer

Along with the help or /? after a command in question is prefer this site

not only does it list all of them but you can click on the to get the sub commands for each and how its used

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.