Sunday, May 20, 2012

Bash on Windows




When you're stuck working on Windows and need some familiar functionality, it's nice to have good old bash at your disposal. There seem to be a bunch of bash implementations for Windows, here's a simple one I found for basic tasks.

win-bash: http://win-bash.sourceforge.net/

 As the author puts it:
 "Although this is a somewhat crippled and not fully compatible `bash' it is still immensely superior to `cmd.exe'. There are many things one needs to do, especially in working with large software projects, that require a fully functioning command line shell."
Win-bash is easy to setup.

-  Just download it: 
http://sourceforge.net/project/showfiles.php?group_id=93835&package_id=99621

-  Extract  bash.exe  to your $PATH (usually C:\Windows\System32)
-  Rename  dot_bashrc  to  .bashrc  and place it in $Home (or C:\ )
-  Edit  .bashrc  by adding your $PATH and the directory where you will place the binaries to be used through bash.e.g:  
  • PATH="\usr\local\wbin;C:\Windows\System32"
Now, win-bash is just the shell binary, so to use tools like ls, chmod, etc. you'll have to donwload:

UnxUtils:
You can extract these somewhere like "C:\" and point to them in the .bashrc (or if you've edited .bashrc to include the above example, you're set to go).

Now just type bash in a cmd, and there you go.


Another shell binary can be found here:
http://www.techsutram.com/2009/05/bash-environment-on-windows-this-is-not.html

For more advanced use and a more wholesome solution, there is CygWin:
http://www.cygwin.com/

And finally, the folks at StackOverflow may provide some insight:
http://stackoverflow.com/questions/913912/bash-shell-for-windows



visit us at:

1 comment:

  1. Incredible. I discovered the youtube . com movie by which a person informed exactly what paints you utilize, however We can't discover the manufacturer on the internet. Would you make sure you inform me personally generate an income will find all of them? Many thanks! I really like your projects.

    cheap coins fut14
    league of legends boosting

    ReplyDelete