Every time I praise WSL on hn I pay the karma tax but I will die on this hill. WSL is more powerful than Linux because of how easy it is to run multiple OS on the same computer simultaneously. It's as powerful as Linux with some janky custom local docker wrappers for device support, local storage mapping, and network mapping. Except it's not janky at all. It's an absolute delight to use, out of the box, on a desktop…
The Windows Subsystem for Linux is now open source
651–660 of 1001 posts
Re: The Windows Subsystem for Linux is now open source
#652Earlier quoted context omitted.
"More powerful than Linux" is silly. It's a VM. The most useful thing is that it does a bunch of convenience features for you. I am not suggesting that it is not extremely convenient, but it's not somehow more powerful than just using Linux. You know what's even more convenient than a VM? Not needing a VM and still having the exact same functionality. And you don't need a bunch of janky wrapper scripts, there's more…
Yeah if you are working with Linux only, its better to go full linux. WSL2 is really handy when you want to run other software though. For example, I use Solidworks, so I need to run windows. Forscan for Ford vehicles also has to run under Windows. Having WSL2 means that I can just have one laptop and run any software that I want.
Right. One of the things a lot of people don't get is the extent to which multidisciplinary workflows require Windows. This is particularly true of web-centric software engineers who simply do not have any exposure to the rest of the engineering universe.
Years ago this was the reason we had to drop using Raspberry Pi's little embedded microcontroller. The company is Linux-centric to such an extent that they simply could not comprehend how telling someone "Just switch to Linux" is in a range between impossible and nonsensical. They were, effectively, asking people to upend their PLM process just for the sake of using a little $0.50 part. You would have to do things like store entire OS images and configurations just to be able to reconstruct and maintain a design iteration from a few years ago.
WSL2 is pretty good. We still haven't fully integrated this into PLM workflows though. That said, what we've done on our machines was to install a separate SSD for WSL2. With that in place, backing-up and maintaining Linux distributions or distributions created in support of a project is much, much easier. This, effectively, in some ways, isolates WSL2 distributions from Windows. I can clone that drive and move it from a Windows 10 machine to a Windows 11 machine and life is good.
For AI workflows with NVIDIA GPU's WSL2 is less than ideal. I don't know if things have changed in this domain since I last looked. Our conclusion from a while back was that, if you have to do AI with the usual toolchains, you need to be on a machine running Linux natively rather than a VM running under Windows. It would be fantastic if this changed and one could run AI workflows on WSL2 without CUDA and other issues. Like I said, I have not checked in probably a year, maybe things are better now?
EDIT: The other reality is that one can have a nice powerful Linux machine next to the Windows box and simply SSH into it to work. Most good IDE's these days support remote development as well. If you are doing something serious, this is probably the best setup. This is what we do.
Re: The Windows Subsystem for Linux is now open source
#653Not a Windows user, but I think WSL is great. I see a lot of Windows user criticising Linux for... essentially not looking like Windows. "Linux Desktop will never reach mass adoption unless it [something that boils down to 'looks more like Windows']". The thing is: I consider myself a real Linux user, and I don't want it to look like Windows. And I hate it when Windows people try to push Linux there, just because the…
Not a Windows user, but I hate WSL. Looks like microsoft realizing they will lose a generation of developers to linux so they implemented linux inside their OS. Now people won't see the joys of recompiling kernel :)
WSL 2 is a special purpose VM which has ties into Windows in a few key ways to make interoperability easier. You can run a program on Windows and pipe its output to a Linux program for example. Windows and WSL can trade system RAM back and forth as needed. Networking between the two is very smooth.
You can recompile the kernel for WSL all you want, and many do. Microsoft make their changes public as required by the GPL. You can use your own kernel without anything from Microsoft. You can easily create your own WSL distributions, customized to your hearts content.
It’s more than the sum of its parts, really. Feels that way to me, anyway.
Re: The Windows Subsystem for Linux is now open source
#654The title is misleading and ambiguous as to whether this applies to WSL1 or WSL2.
Re: The Windows Subsystem for Linux is now open source
#655Earlier quoted context omitted.
Very interesting comment there: “ I still hope to see a true "Windows Subsystem for Linux" by Microsoft or a windows becoming a linux distribution itself and dropping the NT kernel to legacy. Windows is currently overloaded with features and does lack a package manager to only get what you need...”
People that comment things like this probably have their heart in the right place, but they do not understand just how aggressive Microsoft is about backwards compatibility. The only way to get this compatibility in Linux would be to port those features all over to Linux and if that happened the entire planet would implode because everyone would say “I knew it! Embrace Extend Extinguish!” At the same time.
Re: The Windows Subsystem for Linux is now open source
#656I'm not be sarcastic or funny when I ask this. Why isn't this called the Linux subsystem for Windows? It seems like a Linux subsystem running on Windows. If it were the other way around, (ie, a Windows Subsystem for Linux) I'd think that Linux would be the primary OS, and something like WINE would the subsystem.
Re: The Windows Subsystem for Linux is now open source
#657Earlier quoted context omitted.
"More powerful than Linux" is silly. It's a VM. The most useful thing is that it does a bunch of convenience features for you. I am not suggesting that it is not extremely convenient, but it's not somehow more powerful than just using Linux. You know what's even more convenient than a VM? Not needing a VM and still having the exact same functionality. And you don't need a bunch of janky wrapper scripts, there's more…
My coworkers stubbornly try to use WSL instead of Linux directly. They constantly run into corner cases and waste time working around them compared to just using Linux. Some tooling detects that it is running on Windows, and some detects that it is running on Linux. In practice, it's the worst of both worlds.
[interop]
appendWindowsPath=false
section in /etc/wsl.conf.
Then everything will go flawlessly.
Re: The Windows Subsystem for Linux is now open source
#658Earlier quoted context omitted.
That makes no sense. Are you actually familiar with the technical issues or are you hand-waving? WSL2 itself is a Linux VM running in top of Hyper-V. Heck, as far as I know other Hyper-V VMs run fine alongside WSL2 too. Why can't a VirtualBox Linux VM do the same?
Because Virtualbox and VMWare Workstation is Type-2 hypervisor, they run on top of the host OS (Windows), and not directly on hardware. https://en.wikipedia.org/wiki/Hypervisor
Re: The Windows Subsystem for Linux is now open source
#659Every time I praise WSL on hn I pay the karma tax but I will die on this hill. WSL is more powerful than Linux because of how easy it is to run multiple OS on the same computer simultaneously. It's as powerful as Linux with some janky custom local docker wrappers for device support, local storage mapping, and network mapping. Except it's not janky at all. It's an absolute delight to use, out of the box, on a desktop…
Re: The Windows Subsystem for Linux is now open source
#660Earlier quoted context omitted.
>The problem is Windows IO filters Not the biggest issue of them, 'find' and 'git status' on WSL2 in a big project is still >100 times slower on windows dev drive which avoids those filters than it is with WSL 1 on dev drive. WSL 1 on regular ntfs with defender disabled is about 4x slower than WSL1 on dev drive, so that stuff does cause some of it, but WSL2 feels hopelessly slow. And wsl 2 can't share memory as well…
WSL2, in my testing, is orders of magnitude faster at file heavy operations than anything outside WSL, dev drive or not. We have an R&D department that's using WSL2 and jumping through hurdles of forwarding hardware because it's night and day compared to trying under windows on the same machine. It provided other benefits too, but the sheer performance was the main selling point. WSL2 does not take less advantage of…
My understanding is when you access files on the windows drive, the linuxvm in WSL2 caches it in its own memory, and the windows side caches it in its: now you have double the memory usage on disk cache where files are active on both, taking much less advantage of caches than if you had used WSL1 where windows serves as the sole cache for windows drives.
I'm only comparing working on windows filesystems that can be accessed by both. My use case is developing on large windows game projects, where the game needs the files fast when running, and WSL needs the files fast when searching code, using git, etc. WSL1 was usable on plain NTFS, and now much closer to ext4 with dev drive NTFS. WSL2 I couldn't make fast.
You could potentially have the windows files on a network drive on the WSL2 side living in native ext4, but with that you get the double filesystem caching issue, and you might slow a game editor launch on the windows side by way too much, your files are inaccessible during upgrades and you have to always have RAM dedicated to WSL2 running to be able to read your files. MS store versions of WSL2 will even auto upgrade while running and randomly make that drive unavailable.