Search code examples
cmdcygwinintegration

Command prompt isn't integrating anything


I installed amazonCLI, as well as Cygwin, and changed the Path env variable to:

%SystemRoot%\System32\Wbem;C:\Program Files\Prio;C:\Program Files\Diskeeper Corporation\ExpressCache\;C:\Program Files\Amazon\AWSCLI\;C:\cygwin64\bin

When I open the command prompt, first of all it is directly pointing to

C:\Users\Stephane

(which I think is weird). And then when I input something like 'ls', the return error is: 'ls' is not recognized as internal or external command, operable program or batch file

Can you please help me know what I am doing wrong? Thanks


Solution

  • From the error message you got, it's evident, that you are trying to execute Cygwin's commands from the Windows Console. That's also the reason, why it's executed in your Windows' profile directory instead of the Cygwin's one.

    You should read the basics about using the Cygwin first, because it seems you don't know what Cygwin exactly is and how to use it. Maybe you don't need the Cygwin at all, it depends on what you need to accomplish. The is for example GnuWin tool set or UnxUtils, which are just a sets of standalone GNU tools compiled for Windows. Cygwin is more like system than standalone utilities. You can for example execute shell scripts under the Cygwin.

    So it depends on your needs. But I simply can't imagine using Windows without Cygwin yet.

    You can execute Cygwin's shell from the Windows Console, but I advice you to use MinTTY (which is in directory $CYGWIN_DIR/bin). MinTTY is a terminal emulator, which executes your Cygwin shell (bash by default).

    To execute for example bash directly from the Windows Console, just execute $CYGWIN_DIR/bash.exe --login -i.