3 ms·
> Question -- from what I understand, WSL2 is closer to Linux running in a VM, whereas WSL1 was like a Windows kernel level version of Cygwin. Is that mostly co
by yjftsjthsd-h 7y ago
> Question -- from what I understand, WSL2 is closer to Linux running in a VM, whereas WSL1 was like a Windows kernel level version of Cygwin. Is that mostly correct?
Yes, that's essentially correct. You could also think of it as WINE in reverse; one big difference from cygwin is that it runs unmodified binaries rather than needing to recompile.
> prior to VMs there was a patch set for the Linux kernel porting it to user space -- so you could run Linux as a user process
User Mode Linux (UML; https://en.wikipedia.org/wiki/User-mode_Linux https://en.wikipedia.org/wiki/User-mode_Linux), which I think is still a thing, although not super popular.
> Would WSL2 be closer to this model, or is it really running Linux under a stripped down Hyper V?
Not even stripped down; it's running Hyper V. (This is one of the big problems with WSL2; if you use it, you can't use non-HyperV virtualization.)
- monocasa 7y ago> which I think is still a thing, although not super popular. Yeah, I compiled a version last week. It's occasionally nice for kernel devs to have an env to try out new ideas, so it more or less gets maintained. Google's gvisor project is sort of a blend of that and WSL. A reimplementation of the linux syscall layer like WSL, but as a linux process like UML instead of as a kernel module as in WSL.
- cpach 7y agoDid WSL1 not use the same binaries as a regular distro? IIRC it will download regular x86-64 .deb packages straight from e.g. Ubuntu’s APT repositories.