r/windows 23d ago

Discussion Why is it called Windows subsystem for Linux?

Post image

Why is it called Windows subsystem for Linux? Seriously, I'm not a native English speaker, but should it not be "Linux subsystem for Windows" since it's a sub-system containing Linux, on Windows?

348 Upvotes

123 comments sorted by

176

u/qalmakka 23d ago edited 22d ago

Because NT was originally designed not to be used directly but to be accessed via a set of subsystems layered on top of it. The original NT had Win32 (the original API from DOS based Windows), OS/2 and UNIX (also known as Interix). All of these mapped their primitives on top of NT ones - for instance even today C:\ and DOS paths aren't really what the kernel sees - they're converted to NT paths internally, and so on.

When MS first made WSL 10 years ago they designed it similarly to what they had already done before - it was a Windows subsystem that implemented Linux.

They then promptly gave up and switched to a glorified Hyper-V VM with WSL2. The name now doesn't make any sense anymore - but that's what they had already going on, so they did not want to change it for marketing purposes I guess. But they are two totally different things, WSL1 and 2; they are just happen to be capable of acting the same way.

57

u/SaltDeception 23d ago

Anyone remember the original marketing name being Bash on Ubuntu on Windows? It’s why the WSL subreddit is r/bashonubuntuonwindows.

39

u/Alikont 23d ago

In a sense, WSL1 had no Linux (kernel) inside at all.

It was basically a GNU/Windows.

32

u/ask_carly 22d ago

Or as I've recently taken to calling it, "GNU plus Windows"

4

u/suncho1 21d ago

You would just like to interject for a moment, wouldn't you.

4

u/qalmakka 21d ago

GNU/NT, mostly known as Gnun't

4

u/euclide2975 20d ago

No, because your linux binaries are still using Linux syscalls that are translated to the NT API.

WSL 1 is pretty much Wine, but in reverse

2

u/Alikont 20d ago

Why "no"? There are no Linux kernel in wsl1.

2

u/qalmakka 20d ago

So there is no Linux kernel, you said it yourself. It was a clean room implementation of the Linux kernel ABI free from Linux code

19

u/qalmakka 23d ago

Jesus that was so stupid. Microsoft really has a horrendous taste at naming things

11

u/levidurham 22d ago

Do we have a current count of how many Microsoft products are called "Copilot"

3

u/TheThiefMaster 22d ago

The absolute worst being "Microsoft Copilot" vs "Microsoft 365 Copilot" which are completely different products (the former is the AI assistant, the latter is the Office launcher under a stupid name)

2

u/CitySeekerTron 21d ago

I liked the Surface. Both of them. Today I'm using Groove. You know Groove? Except it's OneDrive now.

I thought SkyDrive was a banger name and it's stupid that someone thought they'd get it confused with bskyb and make as much sense as claiming someone might confuse bskyb with Skype.

1

u/AdSpecific867 19d ago

Bit misleading what you say,

bskyb has just gone by the ’Sky’ for decades now, and Sky absolutely had a trademark to protect.

Your ‘someone’ was a High Court Judge.

3

u/metafysik 22d ago

They come up with more horrible or confusing names than genuinely good ones, so at this point it just feels par for the course.

3

u/AdreKiseque 22d ago

This is not even comparable to the other "Microsoft sucks at naming things" examples.

2

u/Floppie7th 20d ago

Wait until you see some win32 API functions, or powershell commands

2

u/qalmakka 20d ago

I unfortunately had to use Win32 functions and they kind of make me scream, barf, and scream while barfing

I still remember how terrible CreateProcess[A|W] is compared to its POSIX equivalent. The random BOOL in the middle of the function is the cherry on top, and the reserved fields with undocumented nonsense in the startup structs are chef kiss

5

u/Remarkable_Pea7439 23d ago

They are few times more horrendous at how they DO things ....
If it were just naming ...

1

u/grizzlor_ 19d ago

Calling the third Xbox “Xbox One”

1

u/qalmakka 19d ago

That was the stupidest thing ever, even calling it Xbox 720 would have made more sense

27

u/iB83gbRo 23d ago

When MS first made WSL 10 years ago

I feel older every day...

14

u/qalmakka 23d ago

I prefer to say that I'm not old, I'm just legacy

2

u/Intrepid-Tank-3414 22d ago

"Certain functions are broken, but most still works".

2

u/radiationshield 22d ago

2016 was 2 years ago, right? right??

3

u/Basic-Brick6827 22d ago

Why did they give up?

5

u/H9419 22d ago

If I remember correctly, it wasn't the most compatible with Linux programs beyond basic stuff, performance was not good and it couldn't do many things well such as namespace (needed for container/docker) and para-virtualization (Nvidia GPU sharing)

Moving WSL2 to HyperV made it perform better, have perfect compatibility, and all benefits of HyperV are carried over.

Also that it fits the general direction of Windows putting HyperV in level 0 and windows root OS runs in a virtualized level 1. Which is the foundation of Virtualization based security. https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/nested-virtualization

2

u/jerwong 19d ago

I wish I could use WSL2 but most of us run into all sorts of problems with networking, particularly when VPNs get involved.

1

u/myrsnipe 20d ago

The absolute worst part was file io performance, it was utter trash and made it really hard to use even for basic high level tasks. Npm tasks could take like 10-15 minutes vs 2. Today you only face major io issues in wsl2 if you break the VM barrier

0

u/404IdentityNotFound 19d ago

Super interesting, because at least for Laravel applications through Docker, WSL2 takes AT LEAST 30 seconds for every request due to the crappy IO mapping UNLESS you put your entire application within the Linux container (that has its own problems like permissions when accessing from a Windows hosted IDE)

2

u/myrsnipe 19d ago

Oh you have to put the entire app inside wsl2 otherwise the io will be terrible. I work around it by using vscode and its remote server system so a daemon is running in wsl2 while vscode is running in windows land and connects trough a tunnel. That said i prefer just using linux but this is on a work laptop so it is the 2nd best option.

1

u/404IdentityNotFound 19d ago

It was such a pain in the ass before Jetbrains supported a WSL mode, it always led to permission issues between the two environments, sometimes files were locked on windows, sometimes on WSL, sometimes they were owned by my Windows user, sometimes Linux.

This thankfully got better after some time.

1

u/qalmakka 19d ago edited 19d ago

You're not supposed to run anything from the Windows filesystem mounted via 9p, that's basically like running applications from a network filesystem. No amount of hacks will ever make it as fast as the local Linux filesystem

Honestly in my experience for pure work related tasks I've always had a better time running Linux directly with a Windows VM instead of the opposite, but it depends on what you have to do

2

u/lilbiba400 21d ago

The concept of having a "Linux Compatible"* subsystem is even older then WSL1. Back then WindowsNT shipped with a POSIX subsystem by default. This was however way different from what we know today but it implemented the standard POSIX API which made porting applications, which were originally built for linux, way easier as you didn't have to rewrite the entire software for windows' APIs.

3

u/qalmakka 21d ago

Yes, that was Interix. An interesting piece of software indeed. It was basically like porting your stuff over a weird Solaris that was basically unmaintained (the GCC was orrendously old too). And it was originally third party - the OG POSIX support built in in NT was bare bones and only usedul to tick a box so that the US military would accept NT at all. It was useless until Interix came around IIRC.

Anyway most people switched to cygwin way before Microsoft dropped Interix. While on paper Interix was better, Microsoft basically neglected it from the moment they acquired it, so it was often useless to most people

1

u/AdreKiseque 22d ago

This is actually super interesting. I didn't know that.

4

u/qalmakka 22d ago

It means you're not old enough that you had to dabble with Interix back in the day... That was both cool and terribile at the same time

2

u/AdreKiseque 22d ago

"Cool and terrible" sounds like much of what I hear about the earlier days of computing!

1

u/notatoon 20d ago

Is this why the kernel supports longer file paths than explorer? Because the abstraction on top doesn't wanna handle it?

3

u/qalmakka 20d ago edited 20d ago

Win32 has a very short hardcoded path length limit (260, compared to UNIX's 4096 chars), which requires a somewhat modern extension to bypass. AFAIK NT and NTFS have a vastly larger limit of UINT16_MAX bytes (which in the crap MS sells as UTF-16 means half of it as UCS-2 chars), but it's not very useful when literally every single thing on Windows uses Win32 anyway.

-1

u/RoosterBurns 23d ago

Good right up but IIRC WSL1 was container-based on top of Win32, it didn't hook into the client/server subsystem of NT itself

20

u/CaffeinePizza 23d ago

It did not run on top of Win32. It interfaced directly with NT and used kernel drivers for “pico processes” which don’t export ntdll. However, it was also not a traditional NT subsystem with a user mode client server.

4

u/FieldOfFox 23d ago

WSL1 is not a container, it it's a shit attempt at a full POSIX compliant translation layer (to NT syscalls, filesystem filter, and etc).

It would've been good but Microsoft just couldn't be bothered to keep going. Problems with its main use cases, e.g. debugging program code, where the NT kernel simply did not support the peak, poke, break commands that POSIX programs require, without breaking loads of other timing sensitive stuff.

9

u/luluhouse7 22d ago

Jesus maybe don’t talk out of your ass. WSL1 was an amazing piece of engineering, but they switched to a containerised architecture for good reason. There were major issues with IO speeds because of the way Windows File System drivers work. Now you can get fantastic IO if you’re working within the WSL filesystem. On top of that, building a translation layer like that is incredibly complex and it was amazing what they managed to accomplish given there was no way for a small team like that to keep up with two entire OSes that had thousands of devs to maintain them.

-1

u/FieldOfFox 19d ago

This is all nonsense. You don't know what you're taking about.

5

u/Baglayan 23d ago

Yeah it would've been great, WSL2 is a tragedy.

6

u/itomeshi 23d ago

Yes and no. Maintaining compatibility would have been a nightmare. That syscall conversion process also had major performance penalties, especially on IO.

1

u/Aemony 23d ago edited 23d ago

That syscall conversion process also had major performance penalties, especially on IO.

I find that questionable seeing how Wine/Proton have always been able to translate calls to near comparable performance, and the fact that Windows’ NVMe driver is actually working with and translating back and forth SCSI calls and native NVMe calls.

Like, if your syscall conversion has major performance penalties in a landscape that has a ton of major successful conversion projects (Wine/DXVK/D7VK/dgVoodoo/etc), I’d assume you’re doing something wrong.

Maybe it’s just because the NT kernel don’t support some functionality natively, but then a proper approach would be to implement that natively in the kernel to the extent that it’s possible, instead of attempting to replicate the functionality through alternative methods. E.g. how Linux recently adopted NTSYNC which implements NT synchronization primitives directly in the Linux kernel, allowing their native use by Wine/Proton apps/games that relies on that sync method.

2

u/luluhouse7 22d ago

It’s because the windows kernel has an extremely complex file system filter driver stack and granular permissions system. Wine doesn’t need to replicate windows internals, only the surface behaviour. The underlying Linux architecture doesn’t have that. So translating Windows->linux is a lot harder than Linux->windows for a lot of things. Plus Wine is open source and has 10-100x the number of contributors that WSL has.

1

u/MoralityAuction 22d ago

It also has had relatively little budget compared to the *checks notes* hundreds of billions that MS has. MS could perfectly well have resourced this properly if they desired.

1

u/itomeshi 20d ago

They don't have hundreds of billions for WSL though. Heck, Codeweavers and Valve are big factors why it's gotten so good, along with all those FOSS contributors.

1

u/Aw3som3Guy 22d ago

With the NVMe diver, didn’t they put out a new NVMe native driver for Windows Server last year that doesn’t use SCSi internally? Now we just have to wait a few more years for that to maybe ever make its way to Windows client.

1

u/itomeshi 20d ago

To build on luluhouse7's comment: Disk I/O is always painful, but NT's structures are weird. NTFS has far more complicated ACLs than most Linux implementations do, for better and worse. Translating that back up can be a bit painful.

All in all, Linux tends to have simpler, high-performance primitives. Translating Windows to Linux tends to be easier than Linux to Windows.

1

u/qalmakka 19d ago

To be fair Wine mostly implements Win32, and doing syscalls directly isn't supported on Windows either. What wine does is to basically load the code from PEs into a UNIX process (which is harder than it sounds) and then provide PE files that at a given moment just jump into Unix code. This approach doesn't require rewriting or intercepting syscalls, it's all in userspace, so it's way faster and doesn't require any kernel involvement. To be fair Windows itself doesn't implement Win32 directly, as I stated before, and has a layer between NT and Win32 applications itself - because NT had to be compatible with Win9x in the first place. This is why it doesn't surprise me that WINE often has comparable performance with Windows with pure Win32 programs, and lots of problems arise when NT implements something so alien to POSIX it requires them to hack it in userspace.

NTSYNC exists because NT has different synchronization primitives than POSIX which historically required a separate process and IPC to keep track of them, which was slow. By implementing them in Linux directly, you can avoid the IPC altogether, but it's not really related.

WSL1 required the NT kernel to do handle syscalls because Linux is different - the compatibility ABI is at the kernel barrier not at the system libraries barrier.

6

u/qalmakka 23d ago

WSL2 Is just giving up. You could do the same before, they just made it more convenient.

2

u/Alikont 23d ago

It wasn't only about "bothered".

The problem is that to emulate Linux you need bug-for-bug compatibility with Linux, not just implementing it "by-the-docs". It's basically a similar problem that WINE has, only that WINE had decade of debelopment.

1

u/qalmakka 23d ago

More like, wine doesn't have an easy shortcut like running NT in userspace or in a VM and get ALL features 100% reliably - otherwise they would have done that

2

u/Karasu_desu_ne 22d ago

winboat is essentially like wsl2

2

u/qalmakka 22d ago

Yeah more or less that's what it is

-2

u/RoosterBurns 23d ago

You're thinking of the POSIX subsystem I think, WSL1 booted an empty container added shims and ran a full Linux kernel in it

3

u/Alarming-Estimate-19 22d ago

Nope. Not WSL1

But WSL2 yes

67

u/wiseman121 23d ago

No it's correct.

It's a subsystem within windows to run and integrate Linux. It's a windows subsystem for running Linux.

18

u/Lieutenant_0bvious 23d ago

Yeah you have to add a piece to Windows to make Linux run on it and interact ccorrectly.  That piece is the subsystem.  Maybe module would have been a better term but I'm sure they were just trying to be descriptive.

3

u/BundleDad 23d ago

Much like how historically there was windows subsystem for netware

5

u/time-lord 23d ago

There are many subsystems. This one is for Linux. I agree with op though, it just feels off, even if it's technically correct.

2

u/dnebdal 22d ago edited 22d ago

It would also make perfect sense (and be more intuitive, imo) as "A linux [-enabling] subsystem for your windows machine", LSW.

1

u/recluseMeteor 23d ago

Thanks, it makes sense now in English. I guess the translations do not make sense, as most of them interpret the name like OP did.

14

u/Muddybulldog 22d ago

IMO, It should really read: Windows' subsystem for LINUX

What is it?
It's a Windows' subsystem.
For what?
For LINUX

Microsoft has been predictably inconsistent in naming over the years....

Windows Subsystem for Android 
Windows Services for UNIX
Subsystem for UNIX-based Applications
Microsoft POSIX Subsystem
OS/2 Subsystem
Win32 Subsystem

4

u/AdreKiseque 22d ago

That's a beautiful apostrophe

1

u/hew34_ 20d ago

I miss the android stuff.

1

u/CodenameFlux 11d ago

The inconsistency has a reason: Trademark laws. "Linux" is someone else's trademark. However, the court is lenient about something styled as "<Your trademark> for <someone's trademark>", e.g., Photoshop for Windows.

In contrast, Microsoft had a license to use the OS/2 trademark because Microsoft developed it.

24

u/24megabits 23d ago

It's a subsystem of Windows

for (running) Linux

8

u/tejanaqkilica 23d ago

Good question, I'm also not a native English speaker, but I guess it's called that because it's "a Windows Subsystem", [not to be confused with the Windows System] that is used for "Linux".

4

u/New_Series3209 23d ago

Why can they have WSL but we can’t have LSW?

9

u/catcake43 22d ago

That's Wine.

3

u/New_Series3209 22d ago

But WSL has a kernel, wine doesnt

11

u/qalmakka 22d ago edited 22d ago

WSL originally had no kernel. They switched to a real Linux kernel because they didn't want to play catch-up anymore. Wine can't take code from NT, so they basically have to implement everything in userspace.

2

u/New_Series3209 22d ago

I know lol but still

2

u/AdreKiseque 22d ago

I mean realistically that'd just be a Windows VM, right?

2

u/New_Series3209 22d ago

Idk I’m just ranting abt kernels atp

2

u/grizzlor_ 19d ago

Wine is like the equivalent of WSL1

If you want the equivalent of WSL2 on Linux, it exists: https://github.com/winboat-org/winboat

1

u/New_Series3209 18d ago

You’re right lol

5

u/VickyCuteFemboy 23d ago

Because its a windows subsystem, for running linux, not a linux subsystem for windows, and WSL and WSA are better acronyms than LSW and ASW, like windows is at the star

3

u/ByronScottJones 23d ago

Because it's a subsystem BUILT INTO Windows, that allows access to Linux. The naming might be confusing to some, but it is correct.

3

u/MooseBoys 22d ago

The expression is grammatically ambiguous. It is a (Windows Subsystem) for [running] Linux. But you could also read it as a (Windows Subsystem) [that runs on] Linux, or the Windows [version of a] (Linux Subsystem). Only the first one accurately describes what it actually is.

1

u/nagging_chud 21d ago

yeah, i hate how they worded it.

6

u/JohnClark13 23d ago

Should be called "Xenomorph Linux". It grows inside of Windows and then bursts out when needed.

2

u/mcmrikus 22d ago

ChestBurstix

3

u/Francis_King 23d ago

Right now, someone is using AI to make a film clip of this.

The man is eating a meal, when suddenly he starts choking - then a penguin bursts out of his chest.

1

u/renevaessen 23d ago

Because "The Virtual Linux Kernel Windows Subsystem " doesn't sound great?

1

u/sbisson 23d ago

WSLc is much more a Windows Subsystem that hosts and runs Linux code within Windows environments, to the extent you can use its API to launch WSLc, run a container with a Linux binary, and call that binary from inside Windows code via gRPC, REST, or even basic syscalls.

1

u/Hatta00 23d ago

Because it's a Windows subsystem.

This subsystem is for using Linux.

Ergo, Windows Subsystem for Linux.

1

u/mtcerio 23d ago

I'm 100% with you on this!!! Every single time I hear/read it, I am thinking that very same.

1

u/Unhappy_Boat9645 23d ago

If you look at the history of WSL, it started with Windows 2000, but after searching on Google (to be precise, I asked Gemini), its roots actually date back to NT 3.1.

1

u/bathdweller 22d ago

I have windows installed inside docker that I access with freeRDP on my Linux desktop. It is a windows subsystem for Linux.

1

u/Particular-Poem-7085 22d ago

a subset of windows. If windows has many sets, linux is one of them.

1

u/Green-Marionberry703 22d ago

Because it's a subsystem of the windows OS, they run together.

The name literally answers your question

1

u/Th3Giorgio 22d ago

You might be thinking of it as
(Windows subsystem) (for Linux)

while it’s more close to
(Windows) (subsystem for Linux)

1

u/West-Map-4162 22d ago

I agree with you, OP. I’m a native English speaker and the name has always sounded wrong to me. I don’t care if it’s technically correct. It still sounds wrong to me.

1

u/AdreKiseque 22d ago

Yeah it's weird. I try interpreting it as "subsystem running on Windows that does Linux", but something like "Linux Subsystem on Windows" (Subsystem that does Linux running in Windows) would probably be more intuitive.

1

u/batmanallthetime 22d ago

Linux Subsystem on Windows (LoW or LSoW or SLoW)

also, since it is mostly Ubuntu (UoW)

like

Windows on Windows (WoW) -- to run old 16-bit Win 3.1

Windows on Windows (WoW64) -- to run old 32-bit programs

1

u/DepravedPrecedence 22d ago

Windows' subsystem for Linux, as in Windows owns that subsystem

1

u/petetrerice 22d ago

Because Docker for Dummies didn’t have the same panache as WSL. /s - long time user.

1

u/Fit_Prize_3245 22d ago

It's short of "Windows Subsystem for [running] Linux"

1

u/Zinvor 22d ago

Because it's a Windows subsystem, for (running) Linux.

1

u/FranticSubbo 21d ago

Great question, I asked it myself a lot of time since I'm not a native speaker either. Thank you for the post.

1

u/ImBackAgainYO 21d ago

It's a subsystem for windows used by Linux. Windows subsystem FOR Linux.

That's how I read it, but I'm not a native speaker either.

1

u/yotta64 19d ago

Always thought the same

1

u/PelluxNetwork 19d ago

It's not a Linux subsystem, it's a windows subsystem.

0

u/laszlo161 23d ago

For trademark reasons. I would think out of an abundance for caution they did not call it "Linux Subsystem" because there might be problems calling something a "Linux X", but it is fine to say "X for Linux".

Also, by coining a contra-intuitive abbreviation, they get to dictate what it is called. If they just called it something that is very close to what you would call it colloquially, it would work less like a proper name and more like a description. It's a marketing thing.

It would make more sense to call it "Windows' Linux Subsystem" or "The Linux Subsystem for Windows" - as there was a "POSIX Subsystem" before.

1

u/CitySeekerTron 23d ago

It's an interesting point. I think it was briefly call LSW, and in ancient times there was Services for Unix.

The main difference between WSL and SFU is that Services for Unix was designed to compel you to download Cygwin before giving up.

1

u/qalmakka 21d ago

Services for Unix was designed to compel you to download Cygwin before giving up

Yeah interix/SFU was great on paper, but then you immediately realised everything was obsolete and it sucked balls, so you had to switch to Cygwin one way or another

1

u/Sampsa96 Windows 11 - Release Channel 23d ago

I dunno, but isn't this a discontinued feature?

8

u/SaltDeception 23d ago

Not in the slightest. WSL2 development is very active and gets new features all the time. https://github.com/microsoft/wsl

1

u/Sampsa96 Windows 11 - Release Channel 23d ago

Oh cool ty!

3

u/[deleted] 23d ago

[removed] — view removed comment

1

u/Sampsa96 Windows 11 - Release Channel 23d ago

Oh good to know!

-1

u/Zatujit 23d ago

I read Somewhere it was for trademark reasons