Y
Y
yagtec2013-12-22 17:30:25
bash
yagtec, 2013-12-22 17:30:25

Why don't bash commands work in cygwin mintty?

Hello, please tell me how to make mintty work ?
Standard cygwin terminal works fine, all commands work. However, in mintty, for example, the ls command throws an error:
bash: ls: command not found
I tried the following:

"Cygwin ls command not found"
If you are a linux enthusiast and really miss those greps and sed/awks on the windows box, you've probably installed cygwin. You tried running it either by double-clicking the cygwin icon on your desktop or the cygwin.bat file in your "C:\cygwin" directory and got the bash-3.X$ prompt. However, although the pwd or cd commands work, if you try ls, it says:"ls: command not found".
Here is what you need to do to fix it:
1. Right click on "My Computer" -> Properties -> Advanced -> Environment Variables
2. Add a new environment variable, called CYGWIN_HOME and set its value to C:\cygwin
3 Edit the PATH environment variable and add C:\cygwin\bin to it (usually separated by a ';').
4. Just click okay, exit any command prompts or bash shells (over cygwin) you may have open, and open it again - it'll work!
Note: this assumes that you have installed cygwin at C:\cygwin. If you've kept it someplace else, please modify the above accordingly.

however, this did not help. What else can you try?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Klyushkov, 2013-12-23
@m_klyushkov

Is cygwin definitely installed in c:/cygwin? Try reinstalling it, carefully watch what you click during the installation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question