> PS: Any idea why Microsoft 'needed' a special init system for WSL2 anyway? Full fat systemd systems boot in like 8 seconds anyway! WSL's imitators on macOS (e.g., Lima, Orbstack) work with regular Linux distros and just leave the init system intact.
My slightly educated guess would be on the point that in WSL2 distros, those do share the same running kernel, the same network stack and probably couple of other things under the hood (something about binfmt?).
From the product perspective, booting another instance (say I have Ubuntu 22.04 and 18.04 both available) in ~ 1 second, can be seen, and even proved with some A/B testing, as a huge advantage.
PS C:\Users\coolcold> wsl -t 'Ubuntu-18.04'
The operation completed successfully.
PS C:\Users\coolcold> wsl -l -v
NAME STATE VERSION
* Ubuntu-22.04 Running 2
Ubuntu-18.04 Stopped 2
PS C:\Users\coolcold> netsh wlan show interfaces|wsl -d 'Ubuntu-18.04' -- fgrep Mbps
Receive rate (Mbps) : 390
Transmit rate (Mbps) : 390
the call for `wsl` is almost instant even for stopped instance
> From the product perspective, booting another instance (say I have Ubuntu 22.04 and 18.04 both available) in ~ 1 second, can be seen, and even proved with some A/B testing, as a huge advantage.
For me at least, they went to more trouble than it's worth for that ~6-7 second gain, given that a normal systemd distro will boot in 7 or 8 seconds anyway. Maybe the difference is bigger on spinning rust. But when I used WSL regularly I was in one VM all day every day. It was always running, so I really wasn't worried about the 10 seconds it took to start up or whatever.
At the same time, their custom init setup caused compatibility issues with my distro of choice and some applications (somehow). So it didn't come for free.
My slightly educated guess would be on the point that in WSL2 distros, those do share the same running kernel, the same network stack and probably couple of other things under the hood (something about binfmt?).
From the product perspective, booting another instance (say I have Ubuntu 22.04 and 18.04 both available) in ~ 1 second, can be seen, and even proved with some A/B testing, as a huge advantage.
the call for `wsl` is almost instant even for stopped instance