39

Everyone says that the Linux subsystem, or WSL, is only supported in Windows 10.

Screenshot of WSL option

So if this is true, can someone explain what does this, very similar looking, option in Windows 7 mean? What exactly does it enable?

Screenshot of subsystem for Unix-based applications option

0

2 Answers 2

26

Everyone says, that Linux subsystem,or WSL, IS only supported in windows 10.

Everyone is absolutely correct. Windows Linux Subsystem does not exist and cannot be enabled/installed on Windows 7.

Subsystem for UNIX-based Applications has nothing to do with the Windows 10 feature. It was also known as Interix before it was discontinued with the release of Windows 10.

Interix was an optional, POSIX-conformant Unix subsystem for Windows NT operating systems. Interix was a component of Windows Services for UNIX, and a superset of the Microsoft POSIX subsystem.

The tools that were supported were recompiled versions. The tools contained within a WSL instance are the same tools that run on Linux.

Unlike in the past the actual Linux distribution, is compiled into a UWP application, which interfaces with the Linux Subsystem allowing virtually any Linux distribution to now be compatible.

We distribute Linux distros for WSL as UWP applications through the Microsoft Store. You can install those applications that will then run on WSL - the subsystem that sits in the Windows kernel. This delivery mechanism has many benefits as discussed in an earlier blog post.

Source: Creating a Custom Linux Distro for WSL

There is an inherited limitation dealing with Linux kernel level drivers (they are not supported) so all devices interface indirectly with the Windows device driver.

Source: Interix

8
  • No, the Linux distribution isn't compiled as UWP. The ELF executables run directly.
    – Ben Voigt
    Apr 20, 2019 at 7:14
  • How could you compile a distribution into a UWP application? What would that even mean? A distribution is a large collection of executables, scripts, configuration files etc. It isn't a single thing. I admit I haven't used Windows since the 90s so I don't know how this works, but are you sure an entire distribution is somehow packaged as a single thing? That really doesn't make much sense to me. AFAIK, the WSL is just a compatibility layer allowing the execution of Linux tools on the Windows machine.
    – terdon
    Apr 20, 2019 at 15:31
  • @terdon - I will work on the statement, but WSL is NOT just a compatibility layer, that runs Linux tools. I can remote into my Kali WSL instance. The Kali instance when properly configured has a desktop, while remotely accessing it, it can run applications with a GUI. Blog
    – Ramhound
    Apr 20, 2019 at 17:51
  • @Ramhound yes, but all of those are presumably running through the same compatibility layer. And I call it this because that's what it's called on WIkipedia and because it is described as "the space between the user mode Linux binaries and the Windows kernel components where the magic happens." on the official msdn blog, and it's commonly referred to as such.
    – terdon
    Apr 20, 2019 at 17:59
  • @terdon - I Provided a source for my statement and I stand by the verbiage I used. While it might be overly simplified, it is indeed accurate, to say the distribution is compiled into a UWP application.. Microsoft themselves say the distribution is compiled into a UWP (launcher) application.
    – Ramhound
    Apr 20, 2019 at 18:00
60

TL;DR

There were many Unix subsystems in Windows in the past, providing POSIX APIs for compiling Unix code without porting to Windows

WSL is a new subsystem in Windows 10 for running Linux ELF files directly without recompilation


In the 1980s the US federal government required that certain types of government purchases be POSIX-compliant, therefore MS had to include a POSIX subsystem in Windows

Microsoft POSIX subsystem is one of four subsystems shipped with the first versions of Windows NT. (The other three being the Win32 subsystem which provided the primary programming API for Windows NT, plus the OS/2 and security subsystems.)

https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem

That was one of the reasons of POSIX filename support in NTFS, and the existence of the registry key HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\ObCaseInsensitive for compatibility with case-sensitive file names in POSIX subsystem and on the network

However the POSIX subsystem only implements POSIX.1 which doesn't include command line tools. In Windows XP / Windows Server 2003 it has been replaced with Windows Services for UNIX (SFU) which is what you see. It's much more powerful and was later renamed to Subsystem for UNIX-based Applications in Windows Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2

Subsystem for UNIX-based Applications (SUA) is a source-compatibility subsystem for compiling and running custom UNIX-based applications on a computer running a Microsoft® Windows® server-class operating system. You can make your UNIX applications fully interoperable with Windows in SUA with little or no change to your original source code.

Subsystem for UNIX-based Applications

SUA was removed in Windows 8 and Windows Server 2012


Unlike WSL in Windows 10, those subsystems are not meant for running Linux ELF executable files directly, therefore you'll have to recompile for that subsystem if you want to run under it

Further reading:

7
  • Good answer, but unless I’m mistaken you haven’t actually said what the SFU is for - that is, mounting NFS shares etc - only what it can’t be used for.
    – Darren
    Apr 19, 2019 at 17:33
  • 2
    @Darren: I think you're mistaken, the quote block says "Subsystem for UNIX-based Applications (SUA) is ... for compiling and running custom UNIX-based applications on a computer running a Microsoft® Windows® server-class operating system" The NFS network redirector is a different component, also visible in OP's screenshot.
    – Ben Voigt
    Apr 20, 2019 at 7:13
  • @BenVoigt hmm, maybe. It’s been a while since I did anything like that, but was sure I’ve used it to mount NFS shares.
    – Darren
    Apr 20, 2019 at 7:17
  • 3
    @Darren: Most of it did, but the NFS file share support was split off into a separate component (Services for NFS, subcomponent Client for NFS)... It's visible right there as the very first checkbox in OP's Windows 7 screen image, and it's a few rows off-screen in the Windows 10 screenshot.
    – Ben Voigt
    Apr 20, 2019 at 7:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .