1. 42
  1.  

  2. 22

    I’ll never understand why WSL wasn’t named “Linux Subsystem for Windows”.

    1. 21

      Because Windows has historically had several subsystems, including the OS/2 subsystem, POSIX subsystem, and, most famously, the Win16 subsystem, which were all called e.g. “Windows Subsystem for OS/2”. WSL1 built on roughly the same model, and so ended up with a similar name. WSL2 is entirely different, but we’ve got the name stuck now.

      Note, I’m not really disagreeing with you, but just explaining that this naming convention is just how Windows has named its subsystems for a long time.

      1. 4

        Would it have made more sense to call it “OS/2 Subsystem for Windows?” Or is there some reason the reverse made more sense?

        1. 6

          Back in the 90s, when this showed up with the first versions of Windows NT, the word “applications” was either explicit or obviously implicit (I sincerely forget which) for all of these. So “Windows Subsystem for OS/2 Applications,” or “…for POSIX Applications,” if you will. At the time, Windows NT was trying to subsume minicomputer and (in some cases) mainframe environments, but not vice-versa, so the ambiguity the elision has in 2021 just didn’t exist in 92 or whenever this was.

          1. 3

            One wonders why the word “Windows” was not implicit too. Of course it is a Windows subsystem. It is a subsystem on your Windows. You don’t have subsystems for other operating systems on your Windows than for Windows. Otherwise it would not be a _sub_system, right?

            1. 1

              The Windows 2000 bootscreen would say “built on NT technology”. I always thought that was slightly amusing (I would have done the same though since not everyone knows that NT stands for “new technology”; most people in fact don’t know).

              1. 1

                “NT” did stand for New Techology but I think by the time W2000 rolled around it was just its own term - “Windows NT” was the server version of Windows.

                1. 1

                  This joke was already running around cca. 2002 or so: https://imgur.com/a/UhSmCdf (this one’s a newer incarnation, I think). By that time the NT was definitely its own term. I remember people thinking it stood for “networking” as early as 1998 or so.

      2. 5

        This is from the company that named the phone they pinned all their iPhone rivalry hopes to the “Windows Phone 7 Series” so honestly I don’t think we can ask too much.

        Think of it this way: you’d like it to be

        (Linux Subsystem) for Windows

        But instead it is:

        Windows (Subsystem for Linux)

        There’s just a missing apostrophe to denote possession that would fix it all:

        Windows’ Subsystem for Linux

        1. 2

          but it’s not for linux, it’s for windows.

          1. 2

            Windows Subsystem for (running) Linux.

            1. 1

              but you don’t run linux (the kernel), you just run a GNU userland right?

              (inb4 “I’d like to interject…”)

              1. 2

                In this particular case, WSL2 literally is purely about the Linux kernel. You can use any distro you want, including those with a BSD or Busybox userland.

                1. 1

                  what does it mean to be “about the linux kernel”

                  1. 2

                    It is a Linux kernel running in a virtual machine. WSL1 was a binary compatibility layer, WSL2 is actually a VM running a Linux kernel.

                    1. 1

                      I see, thanks

        2. 2

          My understanding is that by that point there were a few “Windows Subsystems” already, not necessarily implementing other OS APIs.

          1. 1

            There were originally 5, I think: • Win32 • WOW – Windows on Windows – the Win16 subsystem • DOS • OS/2 (for text-mode apps only) • POSIX (the NT Unix environment)

            OS/2 was deprecated in 3.51 and dropped in 4.

            64-bit NT drops the old WOW16 subsystem, but replaces it with WOW32 for running Win32 apps on Win64.

            The POSIX subsystem has now been upgraded to be Linux-kernel compatible.

            WSL 2 is different; it’s a dedicated Hyper-V VM with a custom Linux kernel inside.

        3. 4

          Does it require MS-DOS, or it will run on any sufficiently compatible DOS system, such as FreeDOS?

          1. 10

            I haven’t looked at the code, but if it’s doing what I think it’s doing, there shouldn’t be any reason it would depend on MS-DOS specifically.

            I suspect it’s launching a Linux kernel, preserving the first 1MB of memory, and then launching a process in Virtual 8086 mode that maps the first 1MB into memory; and finally returning DOS, this time in Virtual 8086 mode.

            In other words, preserving the state of the system as DOS sees it, and launching a virtual machine with that same state once the Linux kernel starts, and returning that VM to the foreground.

            EDIT: checked the code, looks like this is the case. Testing it with FreeDOS now.

            1. 3

              That’s a beautiful hack. Thank you for looking into it.

              1. 3

                If it’s that hands-off, could it run CP/M-86? Or Xenix? Or other OSes for the 16-bit x86?

                1. 2

                  If it’s that hands-off, could it run CP/M-86? Or Xenix? Or other OSes for the 16-bit x86?

                  CP/M-86 maybe, I believe it’s syscall interface is similar as DOS, but I can’t remember off-hand—I also don’t know if it supported subdirectories. Xenix, no, not without a rewrite.

                  That being said, the only thing it really needs DOS for is to load the linux system off disk, so it would be relatively easy to reimplement that part of the code for other 16-bit OSes.

            2. 1

              What about hardware requirements? RAM, CPU?