My command prompt won't run any simple commands such as
pwd. It only shows the following error:
"xxxxxx" is not recognized as an internal or external command, operable program or batch file.
Does anyone know the solution?
man, ls and pwd are not Windows commands. Install Cygwin or Linux instead, or type Help and learn the names of commands you can use at the Windows command prompt.
The Windows command prompt does not support running programs as do
Other solutions such as Cygwin are possible, but take you even further away from native Windows features.
There are of course various shareware programs which could be used, some of which claim to be compatible with Windows batch commands. But there appear to be no usable third-party reviews, so it is difficult to make recommendations. In any case, lists-of-things is outside the scope of this site.
For Windows as it is, "help" lists commands (not an all-inclusive list, by the way - use
Unix commands aren't available by default on a Windows system. Native Windows versions of the standard GNU tools are provided by the GnuWin32 Project.
You could try PowerShell.
Depending on the version of Microsoft Windows, the commands you mention (man, ls, pwd) may be entirely invalid.
Newer versions of Microsoft Windows do support all of those commands, but not from the "Command Prompt" icon. Instead, they need to be run from PowerShell. For example, in Windows 7, go to Program, Accessories, Windows PowerShell, Windows PowerShell, which runs:
Presumably details (about how to find that software) may vary with different versions of Microsoft Windows.
However, these commands are not supported by the traditional "Command Prompt" icon which runs CMD.EXE or (particularly with older versions of Microsoft Windows) COMMAND.COM
So, what this means is that you just need to be careful about which command prompt you are using. You want the "PowerShell" variation.
You won't be able to run those commands (man, ls, pwd) from within CMD.EXE or COMMAND.COM by using just the software built into a typical Windows installation. However, there may be some ways to get those commands to be supported, by installing some support for running Unix commands, which some of the other answers here mention.