2024年4月1日 星期一

Cygwin vs WSL

Cygwin : CYGnus WINdows
WSL : Windows Subsystem for Linux

Quote

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, runs 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). It also has proper GUI support (on Windows 10 Build 19044+ or Windows 11) but has reduced I/O performance when accessing Windows filesystems compared to WSL 1.


沒有留言: