Cygwin vs Linux Virtual Machine for Development?

erictheavg picture erictheavg · Mar 19, 2012 · Viewed 28.9k times · Source

< skippable part >

I work in IT (mostly desktop support and network administration) in a Windows environment, and I occasionally program.

A couple weeks ago, I decided I couldn't be as effective as I want to be without a Bash environment for my command prompt needs. This is especially true when I am using Ruby and git. I used Msysgit for a while, but I just didn't like how it wasn't extensible like Linux. So, I installed Cygwin and played around with that for a couple weeks.

As great as Cygwin is, it seems like it is meant to be a suped up command prompt, and its compatibility with Linux is just a pleasant side effect. This especially became evident when I tried to upgrade Ruby to 1.9.3 (it worked, but it wasn't straightforward), install rvm (never worked), and install RMagick (may or may not work, but looks like a headache).

So, now I'm considering running Linux in a virtual machine. But I'm worried that might be another can of worms and I'll have wasted hours before I find that out. I like that Cygwin runs in Windows and I get to use my IDE, user folder, and more with it. But I don't like that support for it is not as thorough as for a major distro.

< /skippable part >

  1. Does anyone here have insight on using Cygwin vs running a Linux virtual machine?
  2. Any advice on setting up a Linux development environment in a virtual machine within Windows?

Answer

hovanessyan picture hovanessyan · Mar 19, 2012

I have faced common issues before, and the best solution according to my experience is just 2 workstations :).

Apart from that having Linux running in a virtual environment is way better. First of all, you will have full Linux capabilities (except 3d acceleration, but you probably don't need that). You will have the capability of creating snapshots and revert back to them when things go wrong! You can start multiple environment using templates, which is very convenient.

The only downfall I can think of is performance issues of the host machine. If it's a normal workstation/PC, an IDE + one virtual machine + a 100+tabs browser just makes it slow.