Hacker News new | past | comments | ask | show | jobs | submit login

> I submit that this is rocket science to the majority of Linux users and is not a sufficient answer.

That can't be true, can it? I guess it depends on the definition of "users."




It absolutely 100% can be true.

As an example: Windows Services for Linux 2 used a special init daemon to interact with the host OS.

That meant no systemd. That meant that the `systemctl` program wasn't there.

This baffled legions, armies, of wannabe sysadmins.

https://stackoverflow.com/questions/55579342/why-systemd-is-...

https://superuser.com/questions/1785697/systemd-in-wsl-on-wi...

https://github.com/microsoft/WSL/issues/9477

https://askubuntu.com/questions/1132230/unable-to-run-any-sy...

People on the whole have no idea how this stuff works, and they just copy magic incantations from StackOverflow to get stuff to happen. If that doesn't work, then this OS is broken. The end.

For these guys, WSL was broken.

Result:

MS hired Lennart Poettering.

https://www.theregister.com/2022/07/07/lennart_poettering_re...

He "fixed" it. Systemd now works in WSL2. All those guides for noobs now work. Everyone is happy.

In a world where tools like Flatpak and Snap are proliferating and it's driving deep divisions between Linux distros, if you think the average person struggling with Linux is going to use `ldd` to work out where the dependencies for something live, I'm afraid you are a deep guru who lives on a different plane of existence.

We now have widely-used packaging systems which simply embed an apps entire dependency tree into a package to avoid people having to work out the difference between `apt` and `rpm`. Thousands of terabytes of disk are being burned to make this stuff go away.

Yes, this is too hard. Way too hard.


You make a compelling argument.

> I'm afraid you are a deep guru who lives on a different plane of existence.

I'll take that as an amusing tip of the cap, I hope that is how it was intended. I don't know if I consider myself a deep guru, but if something doesn't run when I expect it to, I do tend to reach for ldd pretty quickly.


It was. :-)


Incidentally, lack of systemd in WSL2 was also a showstopper for NixOS, so before the Poettering hire and WSL2's systemd support, some NixOS hackers worked out a chroot solution to get systemd running under WSL2. :)

(I used to use it at work when I still ran Windows, even after the official systemd support, because Microsoft's implementation had some problems)

> People on the whole have no idea how this stuff works, and they just copy magic incantations from StackOverflow to get stuff to happen. If that doesn't work, then this OS is broken. The end.

I don't think small, weird Linux distros like NixOS or GuixSD or GoboLinux really have the resources to support careless users of that kind, or stand to gain much from them. Projects like that are seeking contributors more than they are seeking users at all!

Is this a tragic flaw? Or is it just a mundane fact about a project that can still thrive in its niche?

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.


> 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.


> I don't think small, weird Linux distros like NixOS or GuixSD or GoboLinux really have the resources to support careless users of that kind, or stand to gain much from them.

You're missing the point. It's not what the distros need from the people. It's what the people need from the distros.

Linux software packaging is junk. It's vastly over-complex, it's horribly fragile, there are multiple rival systems (apt, rpm/dnf, pacman, apk, etc. etc.) and none work with each other and none is a complete answer, and as a result, there are now 2nd level schemes on top of that (appimage, snap, flatpak, docker, etc.) and those reproduce the problems -- they are incomplete, incompatible, etc. -- and they reproduce it with a level of bloat that makes their packages 100x bigger and 100x slower to download and update.

Android just makes this work and has several _billion_ active daily users, who rarely have big issues. I've never heard of anyone "bricking" their phone installing an app. It's more reliable than Windows with 100x as many users.

That is what Linux needs, and it needs it yesterday, lest it become a weird way of packaging apps for Windows boxes. ("Oh, yeah, that? You need to install a wrapper thingie first, then it will work. Install this wsl thing and it'll run.")

We need a better answer. Nix is better in many important ways: it solves these problems, but it does so at a cost, and the sort of people who like Nix don't realise, or don't care, that the cost is terrfying for ordinary mortals.

Gobo survived 20y of neglect by being better in different ways. It makes the existing filesystem less cryptic.

Nix throws it away and tells you that you don't need it.

Better to say "hey, look, we give you a better filesystem" than to be that bearded mystic on a mountain saying "for true enlightenment, you do not need a filesystem".

> Any idea why Microsoft 'needed' a special init system for WSL2 anyway?

Um. Have you used it? This is _not_ just a VM.

It seamlessly extends Windows so that Windows can run Linux binaries.

It is not another OS in a box.

I'm not saying it's perfect -- it is not -- but it's about 20 years ahead of simple VM solutions.

And it does that by integrating with the guest OS via a special init system.


> Um. Have you used it?

Yes, I used it every day at work for most of a year! Its showstopping bugs (a killer memory leak, freezes after suspend, data loss issues (!!), native systemd support making Emacs freeze somehow (???)) are a big part of why I finally took the leap to macOS at work.

How much do you use WSL? Because its bugs go well beyond rough edges and those reliably show up if you actually use it for most of your work every day.

> This is _not_ just a VM.

Sure it is! It's a VM with the following features/integrations that start working without any manual configuration:

  - nice management interface that can download distros for people
  - filesystem sharing via 9pfs, which is cool but unfortunately too slow for serious use
  - a pair of command-line interfaces for invoking commands on each side from the other
    - this doesn't involve the init system btw. it just uses good old binfmts on the Linux side with the Linux-side wsl command, just like some users do with wine for Windows binaries or qemu for RISCV Linux binaries
  - automatically forwards network traffic between the Windows host and Linux guests so that users don't have to manually configure port forwarding
  - a shared display server (Wayland implementation) on the host side and some plumbing to automatically forward its sockets to guest VMs
I'm not sure I'd wanna count this, but some third-party applications also do some socket forwarding tricks (and did so before Microsoft's Wayland implementation was a thing) so that guests can share one Docker implementation, like Docker Desktop, Rancher Desktop, Podman Desktop, etc.

That's it. There's no other magic.

> It seamlessly extends Windows so that Windows can run Linux binaries.

I wouldn't characterize that feature as seamless— in fact it's so bad that you can't reliably pipe the output of WSL commands evoked from the Windows side into a Windows-side pager or clip.exe (sometimes wsl.exe would just hang or eat the output). And then there's the PATH translation issues, which often have to be handled quite manually with subshells calling cygpath or wslpath or whatever.

That particular feature is so bad that I hardly ever used it! I'm astonished to hear you call it 'seamless'. Have you ever tried to share a Yubikey for SSH auth and GPG encryption between the Windows host and Linux guests on WSL2? How 'seamless' was that for ya?

> I'm not saying it's perfect -- it is not -- but it's about 20 years ahead of simple VM solutions.

The things I compared it to (Lima, Orbstack) have the exact same features without ever having replaced systemd. Lima uses cloud-init as the interface for injecting its startup hooks. Idk what Orbstack does. Lima is definitely jankier than WSL2 (which is saying a lot, unfortunately), but Orbstack seems solid.

Anyway, both of them reproduce the port forwarding, filesystem sharing, and command forwarding that WSL2 has without replacing systemd, and Lima is older than the systemd integration for WSL2. Have you used either tool? There's no way WSL2 is even one decade ahead of either, though it might be a couple years ahead of Lima.


OK, fair enough!

Me, no, I have only played around with it. From a technical level, I personally preferred WSL1, which I thought was more elegant. I am happy to concede your points as it certainly sounds like you have more experience with it than me.

WSL2 is just a VM, yes, I totally agree -- but a much better-integrated one than most non-techies could ever hope to achieve, and still better than most techies could achieve unless they really knew their stuff and they were competent in both of 2 different OSes.

From what I've seen over my working life, I'd say about 0.1% of Windows users would have the level of knowledge needed, and possibly more Linux ones -- but they mostly wouldn't want it or care.

My personal impression is that it's an attempt at the classic MICROS~1 "embrace and extend" manoeuvre on Linux.

No, I've never tried the Mac tools you mention, and I don't own a Yubikey or anything like it. I try new distros almost daily on my Mac but I have no need of any integration -- I am not a developer. I review distros sometimes, though, and occasionally things like hypervisors:

https://www.theregister.com/2023/09/29/utm_apple_hypervisor_...


> From a technical level, I personally preferred WSL1

Same. WSL1 was ambitious, wild, and incredibly impressive despite the flaws that eventually convinced Microsoft to start over with WSL2.

> WSL2 is just a VM, yes, I totally agree -- but a much better-integrated one than most non-techies could ever hope to achieve, and still better than most techies could achieve unless they really knew their stuff and they were competent in both of 2 different OSes.

Agreed! WSL2 has a very impressive OOTB experience in terms of getting you from nothing to a VM that you can use. It would be a lot of work to set up comparable integrations yourself.

> My personal impression is that it's an attempt at the classic MICROS~1 "embrace and extend" manoeuvre on Linux.

Unfortunately I can't disagree. People seem to think that MICROS~1 is dead, but as far as I can tell they're in a very similar monopoly position with more or less the same interests now as they've ever had.

> No, I've never tried the Mac tools you mention, and I don't own a Yubikey or anything like it. I try new distros almost daily on my Mac but I have no need of any integration -- I am not a developer. I review distros sometimes, though, and occasionally things like hypervisors:

In that case, Orbstack and Lima might be tools worth your writing, the same way hypervisors and virtualization apps are! They're attempting to be WSL2-alikes but they don't use their own hypervisors (Lima supports qemu and Apple's virtualization framework, idk about Orbstack.)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: