Perm url with updates: http://xahlee.org/comp/cygwin_vs_virtualbox.html
Unix tools on Windows: Cygwin vs VirtualBox
Xah Lee, 2011-05-29
Emacs in Linux is just so much better than emacs in Windows. Been using emacs in Windows for the past 2 years. One major problem is that, when running bash inside emacs, you cannot run commands such as rsync. It won't work. But it does in Linux (or Mac OS X) of course. I MISSED that!!
So, if i ever get my PC fixed and back to Windows, i think i'll stop using Cygwin, but instead, get some VM such as VirtualBox and run linux with emacs inside it. I think it'd be better than running emacs Windows binary or cygwin unix tools. I think my realization is this:
If you need unix tools on Windows such as bash, ssh, rsync, grep, perl, imagemagic, etc as a user but you don't have a need of porting unix software to Windows, then i think a virtual machine solution might be better than cygwin. Both will have a slowness penalty, because it's not native. With emacs and cygwin, you go thru several layers to the Windows API. There's a lot impedance mismatch. With hardware emulation, you run whole linux inside it, so all unix apps work coherently. You can run shell inside emacs, install apps in a breeze by apt-get (or whatever is your linux distro method). I'm guessing, overall, running unix apps thru virtual machine may be faster than thru cygwin layer to Windows API. I'll have to actually try it to know for sure.
2011-06-27 PS the above is guesswork. I've been using cygwin on Windows for 10 years (on and off). I need more tools from unix than MinGW. However, i have not used VirtualBox as a unix tool on Windows for real.
See also: Installing Cygwin Tutorial.
Other opinions: Is Cygwin the best Unix environment for Windows? @ Source superuser.com
PS if you use a lot unix tools on Windows, and have experience on Cygwin vs VirtualBox+Linux, i'd love to hear your experience. (note: direct port of each util (e.g. unixutils) is out except few big packages such as perl, python; because i really need a lots of unix tools, many doesn't have direct win port. MinGW/MSYS is also out for the same reason.)
For completeness, here a list of alternatives to cygwin:
- UnxUtils (collection of independent ports of each unix util) I tried it. Kinda badly outdated and not well maintained.
- Microsoft Windows Services for UNIX and Interix (Microsoft's offer. Part of Windows Server/Enterprise editions. Originally independent.)
- MinGW. Originally a subset of Cygwin, designed for developers who wants to port unix apps.