What is the difference between Windows Subsystem for Linux (WSL), Cooperative Linux (coLinux), and Cygwin?
Solution 1:
WSL would be closer to coLinux than Cygwin.
Keep in mind that Unix, POSIX and Linux are different things.
Cygwin is a POSIX compatibility layer that runs on top of the Win32 subsystem. It has approximately nothing to do with Linux; it can broadly be treated as "just another Unix-like" where porting programs requires recompilation and possibly source modification, and anything that requires non-POSIX Linux-specific features probably won't work.
WSL 1 is designed to be ABI-compatible with Linux proper. It does not use the real Linux kernel, but is compatible such that programs compiled for Linux can run on it without recompilation or translation. WSL is part of the NT kernel, so exists independently of the Win32 subsystem. This is similar to the older SUA, though that was a POSIX (not Linux!) subsystem on top of the NT kernel.
WSL 2, not yet available, will run a real Linux kernel on a lightweight VM. It promises similar Windows integration as WSL 1 but with a real Linux kernel (so kernel modules, filesystems, etc., should work).
coLinux runs a real (though modified) Linux kernel. On the Windows side, it exists as a driver that provides memory management and I/O access. Conceptually, it is closest to a virtual machine, though with closer integration between host and "guest".
From a program's perspective, both WSL and coLinux look approximately the same as a real Linux kernel running on raw hardware. WSL (currently) has more limitations and quirks, but also has first-party (Microsoft) support and wotks on x86_64. coLinux and WSL 2 are real Linux kernels, so will behave just like Linux, whereas WSL 1 is a clean-room implementation of the ABI.
Cygwin does not look any closer to Linux than, say, FreeBSD does.