This article proposes Linux virtualization as an alternative to Cygwin, presents a case for preferring its use in teaching, and clears up some SJSU held misconceptions about Java's Cygwin dependencies.
In the 1990's at San Jose State University, computer science students were sometimes required to run Unix software to complete programming assignments. Since many students (and faculty) were accustomed to using Microsoft Windows, faculty had historically advised or required students to use the Cygwin tool suite. Using Cygwin in the 1990's would permit students with Windows equipment to use the same hardware (usually a laptop) to also accomplish simulated Unix capabilities.
In the days before virtualization this all made sense.
Forcing students to install and configure Cygwin for instructional purposes has been the practice at SJSU since the 1990's. Surprisingly, as late as 2011, some faculty continue to require this antiquated procedure, even though there is much easier way.
Cygwin originated with Cygnus Solutions in the early 1990's. Cygwin was designed to be a POSIX compatibility layer allowing Microsoft Windows ports of Unix C programs. Later RedHat Software and others contributed various GNU Linux utilities, themselves written in C and ported to Windows using the very same Cygwin POSIX compatibility layer.
Sadly the Cygwin apprentice is only familiar with the ported GNU Linux tools, and remains ignorant of the beautiful swan and her vast collection of APIs for system interface compatibilities.
C:\> ls
instead of
C:\> DIR
The novice is aware only of the Unix-like utilities which provide a veneered, not quite virtual, experience of running *nix on Microsoft Windows.
Cygwin's tools provide simulated functionality of common utilities in the form of Windows .EXE's. But alas, Cygwin's simulation is too coarse grained and falls short of machine virtualization. Only through virtualization, may one truely experience Linux running on MicroSoft Windows.
So what is virtualization? The Wikipedia explanation defines what SJSU faculty should expect of students and says it plainly:
For example, a computer that is running Microsoft Windows may host a virtual machine that looks like a computer with Ubuntu Linux operating system; Ubuntu-based software can be run on the virtual machine.
Since the turn of the century, VMWare and VirtualBox offer free software that students can use to allow their Windows laptop to run a Linux distribution such as Ubuntu. A laptop configured with virtualization software seems like magic. Both operating systems magically appear to run at the same time on a single machine.
The best part is that virtualization is trivial to install. So the student invests ten times less effort to setup virtualization than to setup Cygwin.
Yup. As surprising as it seems, some CS faculty simply do not know about virtualization software. Unfamiliar with the virtualization practice of running two OS's at the same time on a single machine, Cygwin would seem to be the only way to get a Unix program running on Windows. Although these faculty are well versed in concurrency theories, they just don't seem to be aware of what you can accomplish in practice. Sort of like a guy who understands music theory, but who's never heard of Beyonce or Rihanna.
If you encounter a faculty who has the strange persuasion to continue to use Cygwin, please ask him/her to read the 2007 white paper report from IBM Global Education, Virtualization in Education.
From the FAQ at cygwin.com:
Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Linux, BSD, and Unix systems) to Windows.
That's right, Cygwin is a porting tool, not a virtualization tool. Cygwin helps you port your C source code from Linux to Windows, so that your Linux application (written in C) can also be compiled to run on Windows, too.
Wait a minute, help me understand. Cygwin helps me port C code, but we're a Java school, right? Do I need Cygwin to do Java?
![]() | Note |
|---|---|
In 2011, several reported that an SJSU faculty member told students Cygwin utilities were required to run Java that was originally designed on Linux to run on Windows. Although the faculty suggests that students may have misunderstood what was communicated... You do not need Cygwin to run or port Java. |
Nope. Java runs perfectly fine on Windows and Linux without Cygwin and without the need for virtualization. Since compiled Java is, well, Java bytecodes, the Java bytecodes run on a JVM. The folks at Oracle, formerly Sun, have already ported the JVM (Java Virtual Machine) to run on Windows and Linux. Java is WORA (Write Once Run Anywhere TM). Again Java runs equally well on Microsoft Windows or Linux without need for Cygwin nor virtualization.
Cygwin is what you use when want your C POSIX source to compile on both Windows and Linux. Again Cygwin is a porting tool. Cygwin is designed to help you port C code, not Java. If you are programming in C and want to target executables to both run on Windows and Linux, then the right tool to use is Cygwin!
But wait, an instructor trying to teach students about some Linux command doesn't require students to cross-compile, port, or even run on both Windows and on Linux. So why use Cygwin, again?
Good question.
Again from the Cygwin FAQ:
...can be used from one of the provided Unix shells like bash, tcsh or zsh, as well as from the standard Windows command shell if you have to for some sad reason.
Unfortunately, the "sad reason" you may be using Cygwin is because you are taking a class with an instructor who forces you to use Cygwin.
Cygwin has some pros:
Continuing to use Cygwin means less work for the instructor. No need to re-author PPT slides. The instructor's old PPT slides would need to be edited if we switched to virtualization instead of Cygwin.
Continuing to use Cygwin means the instructor does not need to learn about VMWare nor VirtualBox. Again less work for the instructor.
An instructor, for example teaching compilers, may actually require students to write portable C code, thus Cygwin would be appropriate.
That's about it for the Cygwin Pro's.
In the 1990's Cygwin made sense, when dual-booting a laptop using a virtual machine may have been too resource intensive.
Cygwin's cons are:
Configuration and installation of Cygwin is at least 10 times more effort that installing Linux via virtualization
Even under a properly configured Cygwin install some things just won't work.
An instructor could spend 10 times more effort helping students setup Cygwin than if that instructor had students use virtualization instead.
You might not find what you want, since not all Unix/Linux tools have been ported to Cygwin.
The Cygwin binary may work differently depending on what version of Windows you are running.
Cygwin is for porting. It's hard to use.
Virtualization is for productivity. It's easy.
Teaching folks with Windows laptops about Linux should best use virtualization not Cygwin.