5 ms·
I realize not everyone will care about this, but I find the naming for these WSL-like subsystems is confusingly backwards. i.e. It should have been Linux Subsy
by rkagerer 1y ago
I realize not everyone will care about this, but I find the naming for these WSL-like subsystems is confusingly backwards. i.e. It should have been Linux Subsystem for Windows, or Window's Subsystem for [Linux | FreeBSD | etc].
- asveikau 1y agoThe explanation they give is they need to put their trademark, Windows, before Linux. Sometimes they say this is advice from the legal department. I still think they could fulfill that requirement and call it the "Windows Linux subsystem" or something, but what do I know? Unrelated, but I think the WSL2 design is kind of stupid. It's just a VM. I think the WSL1 design, where it was a syscall layer, is a better call. But that was slower, IIRC chiefly because the NT filesystem syscalls are slower than Linux's VFS. Rather than improve that problem, they side-step it by running Linux in a VM.
- ronsor 1y agoImproving that problem probably would've been a massive undertaking. That aside, there's the problem that implementing kernel mechanics is a lot more than faking syscalls: the various types of namespaces, FUSE, random edge cases that applications do expect, kernel modules, etc. At the end of the day, users don't want to stumble into some weird compatibility issue because they're running not-quite-Linux; it's a better UX to just offer normal Linux with better integration. The WSL2 design isn't stupid, it's practical. What I will give you is that it's not elegant in an "ivory tower of ideal computing" sense.
- Brian_K_White 1y agoCan I even use a usb serial port yet after how many years? (Possibly by now but how long did it take, and does it actually work well?) It is stupid in that it's not really any kind of subsystem, it's just a vm. VMs have their uses, but it's basically just an app. The reason hardware such as my usb serial example (or any serial) worked on wsl1 was because it actually was a subsystem.
- beagle3 1y agoYour serial might have worked, but your docker didn’t. (And someone else’s other drivers didn’t, and mmapping had ever-so-slightly different semantics causing rare and hard to reproduce issues). WSL2, on the whole, is much more compatible. If you want 100% Linux compatibility, just run Linux.
- Brian_K_White 1y agoI do. That's why I didn't know the current answer to the question. But I use software that wants to talk to hardware, not just cloud software that might as well be on a vps.
- dwattttt 1y agoCalling gcc (which runs entirely happily in WSL2) "cloud software that might as well be on a vps" is at the same time accurate and apparently insulting.
- watermelon0 1y agoThere is no native USB passthrough support, but you can use USB/IP to access them via network. https://github.com/dorssel/usbipd-win https://github.com/dorssel/usbipd-win
- bitmasher9 1y agoWhen people talk about improved compatibility or higher practicality I wonder why they don’t just run Linux on metal at that point. You can either run it on your laptop, or connect to a networked computer.
- kbolino 1y agoThe bigger problem was how fast Linux evolves. Windows kernel development is glacial by comparison. Keeping up with every new thing in Linux was tantamount to maintaining a second operating system.
- bayindirh 1y agoIIRC, there was an article, whose author said that improving NT kernel without blessing from higher ups is even frowned upon. So making a better WSL on syscall layer, which NT kernel is designed for, is not only behind a technical effort wall, but also behind a big red tape.
- RedShift1 1y agoThat's a good thing. The kernel is supposed to be the most stable thing.
- duskwuff 1y agoI'd argue that the breaking point was Docker. Running typical Linux userland applications was doable - and they did it - but making Docker work would have been effectively impossible, as it depends on a ton of highly Linux-specific systems (namespaces, cgroups, bind mounts, etc) with no direct Windows equivalents.
- pjmlp 1y agoWindows has native support for containers.
- kbolino 1y agoWindows containers are interesting. Windows--like most other operating systems--mediates interaction between applications and the operating system though libraries (specifically, user32.dll and kernel32.dll). Whereas, Linux provides a stable syscall ABI that applications can directly interact with. This makes Linux containers fairly insensitive to host kernel version, as long as they don't use experimental features and the host kernel isn't older than the stable features needed by the container processes. I would have expected Microsoft to address this issue in Windows containers by supplying the correct version of the system DLLs at runtime. However, it seems that they decided to bake them in at build time instead. This makes Windows containers similar to Linux containers but it could have made them quite kernel-version-sensitive. According to MSDN, newer kernels are able to run older images, implying to me that they've begun to stabilize the kernel interface, potentially enough to enable proper static binaries. See https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility https://learn.microsoft.com/en-us/virtualization/windowscont... For the topic at hand, though, Windows containers run Windows software, and a lot of software that gets containerized never runs on Windows normally and so can't easily be containerized for that platform. Even when the language and libraries are cross-platform, the build process often isn't.
- bee_rider 1y ago> I still think they could fulfill that requirement and call it the "Windows Linux subsystem" or something, but what do I know? Your name is bizarrely better considering how small the difference is. > The explanation they give is they need to put their trademark, Windows, before Linux. Sometimes they say this is advice from the legal department. It feels like they have some strange internal naming policy. Maybe it is called the “Policy Product for Naming.”
- grugagag 1y agoTheir naming is a serious problem that spreads confusion instead of clarity but what do they know, they’re like a headless chicken that has enough power to stay alive no matter what..
- setopt 1y agoWindows Subsystem for Linux Usage or something would have been clearer.
- asveikau 1y ago"Windows Subsystem for Linux applications"
- cpgxiii 1y agoThe design of WSL(1) makes more sense when you think of its original design goal of being a compatibility layer for Android apps. Android is "a Linux", but it is (1) a relatively unique one, and (2) everything between the Android kernel and Android apps really isolates the application layer from kernel-level details. Given this separation, it makes a lot of sense to leverage the existing NT flexibility and emulate a Linux kernel at the syscall layer. Sure, you'll have to patch some parts of the WSL(1) Android system components, but MS was already going to have to do that to work around Google-only components. In many ways, this route is no more complex than what Blackberry did to run Android apps atop their QNX-based OS. But once you give up the specialization for Android and want WSL to be a "real Linux" (i.e. behave like a specific Ubuntu/Fedora/etc distribution) now you no longer can get away with being Linux-like, you have to be Linux (i.e. you need the syscall layer to directly mirror all kernel development and features). It's actually fairly impressive how much worked with WSL(1) given how different the internals were, but you didn't have to go that far to find tools/services/etc that just wouldn't work. Instead, once you consider how long MS had been working on Hyper-V, and how interested they are in using it to apply additional security boundaries/isolation (e.g. VBS) within what outwardly appears to be a single Windows OS instance to the user, it makes a lot of sense to leverage that same approach to just run a real Linux kernel atop Hyper-V. In that world, you no longer have to match Linux kernel development, you just need to develop/maintain the kernel drivers used to interact with Hyper-V - and MS already had a lot of experience and need to do that given how much of Azure is running Linux VMs.
- technofiend 1y agoIO on many little files is dramatically faster in Linux on ext4 vs Windows thanks to NTFS' journaling overhead. So if you're doing development, you really want to do it inside wsl2.
- emmelaich 1y agoYou can still use WSL1 if you want. (maybe you know this).
- tester756 1y ago>Unrelated, but I think the WSL2 design is kind of stupid Yet in practice works very well There's saying if something is stupid, but works, then it aint stupid
- dvfjsdhgfv 1y agoTrue, but I love the instant boot of WSL1 when I need to do something quickly. And, most of the time, if you don't do IO-heavy stuff, it works quite well.
- al_borland 1y agoIs this because, in the WSL example, it’s not Linux that’s the subsystem, but rather a Windows subsystem that enables running Linux. Thus the name, Windows Subsystem for Linux?
- 1718627440 1y agoIt is because the NT kernel implements multiple personalities, so it could compete in the UNIX market. The component in the kernel that implements a personality is called a subsystem. It used to be a correct technical term, but of course using it to describe a well-integrated VM isn't correct.
- skissane 1y ago> It is because the NT kernel implements multiple personalities, so it could compete in the UNIX market. That wasn’t the original primary reason for it… Windows NT began life as NT OS/2… at first, an evolved OS/2 API was going to be its primary API… then as Windows 3.x took off and the IBM-Microsoft relationship further soured, the OS/2 API was downgraded to a backward compatibility afterthought, and eventually (in Windows XP) dropped entirely. And because they weren’t even sure what the primary API was going to be at first… and the whole idea of multiple OS “personalities” was all the rage - IBM’s Mach-based Workplace OS sought to unify AIX and OS/2 (and they even talked about extending that to OS/400), Taligent (IBM-Apple joint venture) had similar objectives - so it is understandable they made this API flexibility a focus of their early plans And the guy they hired as technical lead in developing NT, Dave Cutler - had come from DEC, which had the very real problem of selling two largely incompatible operating systems (Unix and OpenVMS) - and they also sought to unify them through multiple personalities, as their next generation operating system MICA which would merge Unix and OpenVMS, which Cutler was working on, until DEC management decided to cancel the project, and Cutler went to Microsoft to do the same thing there
- 1718627440 1y ago> the whole idea of multiple OS “personalities” was all the rage It IS honestly kind of cool. If Microsoft would invest into their solid OS instead of enshitifying it, they could implement Linux and Darwin on a single system. That would be quite a selling point.
- PeterStuer 1y agoWindows' subsystem for Linux feels ok. It is a subsystem of Windows after all, not a subsystem of Linux. So I guess this project should be FreeBSD's subsystem for Linux? Or should it be FreeBSD's subsystem for Windows' subsystem for Linux?
- vermaden 1y agoAs usual with Microsoft - its all fucked up. WINE => Windows Subsystem for Linux/FreeBSD/UNIX WSL => Linux/FreeBSD Subsystem for Windows
- surfingdino 1y agoA remnant of their 'Linux is a cancer' phase and the famous fight against Open Source that started with the "Halloween Document" then helping SCO https://yro.slashdot.org/story/21/04/01/1647259/sco-linux-fud-returns-from-the-dead https://yro.slashdot.org/story/21/04/01/1647259/sco-linux-fu... They are not Open Source's friend and at one point extracted license fees from Amazon for using Linux... https://www.zdnet.com/article/amazon-becomes-the-latest-company-using-linux-to-pay-microsoft-for-patent-deal/ https://www.zdnet.com/article/amazon-becomes-the-latest-comp... Yeah, I wish they would leave OS alone.
- 9front 1y agoBefore WSL, Microsoft provided "Windows Services for UNIX" to "Seamlessly integrate Microsoft Windows into your UNIX environment." The same Windows services are provided to "Seamlessly integrate Microsoft Widows into your Linux environment." WSU became WSL!
- gdulli 1y ago"Linux subsystem" would be a subsystem of Linux, which it isn't. It makes more sense the way it is. People seem confused because their mind naturally wants to go to "Linux for Windows", but it's better if they're trained to think of it as a series of Windows subsystems, since that's what they are.
- iamtedd 1y agoThat doesn't make any sense. Using the Linux kernel as an example, it has multiple subsystems. - Power management subsystem - Scheduling subsystem - Sound subsystem etc The word before "subsystem" describes the subsystem itself, not the greater system to which it belongs.
- reaperducer 1y agoI find the naming for these WSL-like subsystems is confusingly backwards. Whoever decided on the name didn't have sentence diagramming in elementary school English class.
- aryonoco 1y agoFor the same reason it’s called “Azure Database for PostgreSQL”, whereas the sensible name would have been “PostgreSQL Database for Azure”. If Microsoft is putting someone else’s trademark (in this case Linux or PostgreSQL) in its product name, their own trademark will always come first and someone else’s trademark will come last.
- wvenable 1y agoTrademark law pretty much requires the "For X" style of product naming. It's caught a few open source projects.
- deleted 1y ago[deleted]
- heavyset_go 1y agoIt follows their old "Windows Services for UNIX" product's naming scheme. I don't like it either, but it's consistent.
- deleted 1y ago[deleted]
- mkhalil 1y agoIt *is* confusing but in actuality, it kind of works: It's a Windows Subsystem - as in the Hypervisor/VM platform - to boot a Linux VM. And, more importantly IMO, Linux distro is using this Windows Subsystem for: booting, drivers, and networking (.e.g. the "/sys/wsl" folder, and whether the Window Subsystem will generate fstab, etc..)
- 1vuio0pswjnm7 1y agoNot that many years ago, I used something called "Windows Services for UNIX" to run GCC on Windows and compile filter programs I wrote on NetBSD using lex https://en.wikipedia.org/wiki/Windows_Services_for_UNIX https://en.wikipedia.org/wiki/Windows_Services_for_UNIX
- 1vuio0pswjnm7 1y agoSpecifically, "Interix" was included Windows 7 https://en.wikipedia.org/wiki/Interix https://en.wikipedia.org/wiki/Interix
- qalmakka 1y agoyeah especially since it stopped being an actual subsystem in the Windows NT sense of the term with WSL2 - it's a hecking virtual machine that's very convenient to run, but that's like saying that WinBoat is a "Linux subsystem for Windows" - totally ludicrous