Running bash commands in cygwin produce the following error:
$ ls
ls: command not found
This is a question that I self-answered on my tech blog where I keep the tech-tips which I need to give to myself from time to time, so I decided to move it over here instead. The original blog post is here: http://thehacklist.blogspot.com/2009/04/cygwin-ls-command-not-found.html
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
.
CYGWIN_HOME
and set its value to C:\cygwin
%CYGWIN_HOME%\bin
to it (usually separated by a ';').Assumption - this assumes that you have installed cygwin at C:\cygwin
. If you've kept it someplace else, please modify the above accordingly.