Live data from Hacker News

Windows Subsystem for Linux: The lost potential

jmmv.dev

21–30 of 250 posts

Re: Windows Subsystem for Linux: The lost potential

#21
post #5

I've dedicated 2 solid work hours to help a co-worker migrate from wsl1 to wsl2. Such a PITA. I couldn't get the linux tab to appear on his explorer.exe like in mine but oh well everything else worked fine!

Wait, I didn't even know that was a thing. I am on WSL2 and don't have that either, nor do I think I ever saw it in Microsoft's docs.

Interesting, thanks. Let's see if I get it to work for me. For now I always went with \\wsl$.

Edit: Wait, are you on an insider build by chance? https://blogs.windows.com/windows-insider/2020/04/08/announc... Seems like this isn't in yet otherwise.

Re: Windows Subsystem for Linux: The lost potential

#22
post #11

I remember NT was to have an OS/2 subsystem, probably because it started out as OS/2 3.0, with a New Technology (NT) kernel. I know there was a POSIX system, but I never saw or interacted with it and, legend says, it was only used to check a box in government contracts.

The original POSIX subsystem was not very useful -- a minimal set of system calls, plus a Microsoft re-branded MKS Toolkit to provide shells and utilities.

Microsoft ended up buying Interix, who offered a much more pleasant UNIX-on-Windows setup. That was supported for many years as "SFU" and later "SUA"

SUA was still a pretty weird UNIX though. PE-COFF binaries, and a linker that wasn't 100% GNU compatible, and a lot of other little oddities. Porting software to SUA was never very much fun.

I assume that was the motive for WSL -- same idea as SUA, but less weird for software ports.

Re: Windows Subsystem for Linux: The lost potential

#23
post #18

Earlier quoted context omitted.

Which was not always the case, up until Mac OS 9 there was no Unix. They delivered with Mac OS X. That’s not cheating, it’s pointing out that Microsoft failed in this regard.

MacOS X is not a new version of MacOS 9 - it's renamed OPENSTEP with a MacOS X theme and some parts replaced. It's also very different from most Unixes in that it has a Mach microkernel with a BSD coat of paint. It almost has more in common with NT than it has with Linux. Before that, MacOS had (AFAIK - never seen it myself) the MPW environment that had a Unix-like shell. And A/UX.

It is POSIX compatible, though, and IMO that is what is actually important for most people/use cases.

Re: Windows Subsystem for Linux: The lost potential

#24
post #9

Contra opinion: the VM option reduced the service interface between Windows and Linux to a single kernel implementation and a few drivers, rather than every possible userspace program ever written. It's an amazing and obvious trade off. My inner architecture astronaut appreciates all the ideas in this post, but I've been trying to kill that guy for over a decade now. The bottom line is WSLv1 design SUCKED precisely b…

I agree with the sentiment but, some scenarios have become orders of magnitude more complicated on WSL2 like connecting to a daemon on Windows or vice versa. I understand clear cut security boundaries and separate network interfaces, but it's extremely hard to get them running smoothly now. Everything was on localhost on WSL1.

Memory usage has also gone bonkers with the VM approach, causing unnecessary overhead for casual users who don't need performance.

Re: Windows Subsystem for Linux: The lost potential

#25
post #11

I remember NT was to have an OS/2 subsystem, probably because it started out as OS/2 3.0, with a New Technology (NT) kernel. I know there was a POSIX system, but I never saw or interacted with it and, legend says, it was only used to check a box in government contracts.

Wikipedia has a medium-sized article for the SFU: https://en.wikipedia.org/wiki/Windows_Services_for_UNIX

Re: Windows Subsystem for Linux: The lost potential

#26
post #22
post #11

I remember NT was to have an OS/2 subsystem, probably because it started out as OS/2 3.0, with a New Technology (NT) kernel. I know there was a POSIX system, but I never saw or interacted with it and, legend says, it was only used to check a box in government contracts.

The original POSIX subsystem was not very useful -- a minimal set of system calls, plus a Microsoft re-branded MKS Toolkit to provide shells and utilities. Microsoft ended up buying Interix, who offered a much more pleasant UNIX-on-Windows setup. That was supported for many years as "SFU" and later "SUA" SUA was still a pretty weird UNIX though. PE-COFF binaries, and a linker that wasn't 100% GNU compatible, and a lo…

On XP and 7 (and 8, perhaps) I used Cygwin to have a Unix-like environment. Does it still work on Windows 10? I remember I could call Windows programs from it and manipulate Windows files.

Re: Windows Subsystem for Linux: The lost potential

#28
post #18

Earlier quoted context omitted.

MacOS X is not a new version of MacOS 9 - it's renamed OPENSTEP with a MacOS X theme and some parts replaced. It's also very different from most Unixes in that it has a Mach microkernel with a BSD coat of paint. It almost has more in common with NT than it has with Linux. Before that, MacOS had (AFAIK - never seen it myself) the MPW environment that had a Unix-like shell. And A/UX.

It is POSIX compatible, though, and IMO that is what is actually important for most people/use cases.

True, but I wouldn't call it cheating except for having renamed it MacOS. It is officially a Unix.

Re: Windows Subsystem for Linux: The lost potential

#29
post #20
post #16

Earlier quoted context omitted.

The OS/2 subsystem existed and shipped up to Windows 2000.

Really?! I tried to run a couple OS/2 binaries back then without success. Did you have to do anything special?

You had to enable the feature and it only supported OS/2 1.x apps (console). No GUI support.

Re: Windows Subsystem for Linux: The lost potential

#30
post #18

Earlier quoted context omitted.

Which was not always the case, up until Mac OS 9 there was no Unix. They delivered with Mac OS X. That’s not cheating, it’s pointing out that Microsoft failed in this regard.

MacOS X is not a new version of MacOS 9 - it's renamed OPENSTEP with a MacOS X theme and some parts replaced. It's also very different from most Unixes in that it has a Mach microkernel with a BSD coat of paint. It almost has more in common with NT than it has with Linux. Before that, MacOS had (AFAIK - never seen it myself) the MPW environment that had a Unix-like shell. And A/UX.

I don't think it's accurate to call it a "BSD coat of paint."

Practically an entire BSD kernel is run as a single "server" in Mach. In Apple's open source release, a majority of the XNU kernel code lies in the "bsd" subdirectory -- Apple's heavily patched 4.3BSD / 4.4BSD / FreeBSD hybrid.

Originally the idea was that having most of a BSD kernel running inside Mach would make it easy for researchers to run tools on their research kernel.

One suspects NeXT had a simpler motive: They just wanted to avoid paying money to AT&T. I'm not sure they had any particular interest in Mach itself. (Although obviously Mach's strange multi-architecture binary format paid off for them big time, some years later!)

Post reply on HN