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:
- Right click on "My Computer" -> Properties -> Advanced -> Environment Variables
- Add a new environment variable, called CYGWIN_HOME and set its value to C:\cygwin
- Edit the PATH environment variable and add C:\cygwin\bin to it (usually separated by a ';').
- 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.
nice thx
ReplyDeleteThanks, roger! Our first comment on the blog! :)
ReplyDeleteHi There !! My Cygwin still doesn't work....
DeleteI am trying to use glx rendering
i write this
User@User-PC /cygdrive/d
$ glxinfo | grep render
and output is this
bash: glxinfo: command not found
NOTE : i am new to unix and cygwin/..Just need help
thanks sudipta! this was very helpful
ReplyDeleteThank you so much. That is very help.
ReplyDeleteThanks a lot! I spent so much time downloading
ReplyDeleteCygwin in order to learn Linux console
commands - and it didn't know even about ls!
I've translated your tip into Russian and
posted to my blog. Hope, you don't mind
You are my hero.
ReplyDeleteThank you :)
ReplyDeleteis it work when cygwin installation is not completed because i need ls command for installation purpose??
ReplyDeletethere is no files in my bin folder .what should i do??
thanks buddy,
ReplyDeletewhat abt the wget command. it is also not working in my cygwin
thanks dude!!
ReplyDeletehi there!
ReplyDeleteBut should you unistall the "run" package from Cygwin...
Even though the Env. variable in Windows reads sequential and if we keep the Cygwin path the last - still may cause prob?
Cheers!
u r really hero
ReplyDeletebut what about vi command
ReplyDeleteLifesaver!
ReplyDeleteAs a side note, you may also want to add:
ReplyDeleteC:\cygwin\usr\sbin to the PATH variable
Thanks Buddy
ReplyDeleteU are genius
Worked like a charm.
ReplyDeleteThanks!
For me , it only worked when i added C:\cygwin\usr\sbin also to the path..Thanks Sudipta
ReplyDeletethanks for the tip
ReplyDeleteDude, you friggin rock. THANKS.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteNice.Easy to deploy and understand.Thanks a lot dude
ReplyDeletethis is the most helpful thing i've ever found on the internet
ReplyDeleteIt doesn't work for me! and I really wonder why since it seems to work for everybody else who commented!
ReplyDeletenot only for you DUDE but also for me..
Deleteexactly the info I needed, thank you so much!
ReplyDeletebhayio top command bi kam ni kar ri meri to :)
ReplyDeleteit doesnt work with mine ..i am running win 7 ,,,,any idea how to get ride of it ???? help me plz. my samsung galaxy ace gts 5830 has bricked while flashing,,,not powering on but detects in odin,,?????
ReplyDeleteThanks for blogging about useful commands.
ReplyDeleteLs command basically displays the content of directory in sorted alphabetically.
If you have millions of files/directories, ls command hangs because of sorting.
Ls –U ouput files without sorting and more useful
Please see more about Ls command examples in Linux/Unix
Hi There !! My Cygwin still doesn't work....
ReplyDeleteI am trying to use glx rendering
i write this
User@User-PC /cygdrive/d
$ glxinfo | grep render
and output is this
bash: glxinfo: command not found
NOTE : i am new to unix and cygwin/..Just need help
Please help me
Deleteoh oh...
ReplyDeletedoesn't work
im on windows 7
did exactly as you wrote
:(
hi,
ReplyDeletecan we add extra commands to existing command?
if yes. how?
Thanks. Saved my bacon. Happens every 2 years.
ReplyDeleteNot working.... Any other proposals ?
ReplyDeleteIt works! thanks for sharing good info.
ReplyDeleteI am working with cygwin emulator in windows 7 few commands are not working like MAN CAL And few plzz make solution to this problem
ReplyDeleteThank you.
ReplyDeleteVery helpful...Thanks a ton.
ReplyDeleteI have windows 10 an tried that approach, but it still didn't work.
ReplyDeletewhyyyy :(
For those of you using win 10 and the above solution does not work, instead add C:\cygwin64\bin to PATH. it will work.
ReplyDeletecheck PATH in C:\cygwin64\home inside file called .profile
ReplyDeleteDo you need to increase your credit score?
ReplyDeleteDo you intend to upgrade your school grade?
Do you want to hack your cheating spouse Email, whatsapp, Facebook, instagram or any social network?
Do you need any information concerning any database.
Do you need to retrieve deleted files?
Do you need to clear your criminal records or DMV?
Do you want to remove any site or link from any blog?
you should contact this hacker, he is reliable and good at the hack jobs..
contact : cybergoldenhacker at gmail dot com