top | item 37565424

Windows Subsystem for Linux 2.0 release

74 points| lnyan | 2 years ago |github.com | reply

67 comments

order
[+] wtallis|2 years ago|reply
... Not to be confused with WSL 2, the VM-based successor to WSL 1's tighter integration of Linux binary compatibility into NT. Both WSL 1 and WSL 2 seem to still be delivered as part of the package that has just reached version 2.0.0, though it doesn't seem WSL 1 is getting much (if any) work these days as it's considered a technological dead-end.

(And in case anyone's interested, it appears WSL 2 was added before this package reached 1.0)

[+] winternewt|2 years ago|reply
I'm confused. Is this WSL1 version 2.0? Or WSL2 version 2.0?
[+] cloudking|2 years ago|reply
Developing code in the same OS you play Baldur's Gate 3 in is the real win. Thanks Microsoft
[+] pynappo|2 years ago|reply
bg3 runs very well on Linux for me through proton, fwiw. Definitely a great feature though, especially if you can't be bothered to dual boot.
[+] satvikpendem|2 years ago|reply
I wonder which is better, WSL with native gaming, or native Linux with virtualized gaming via WINE and Proton. I suspect both solutions will reach parity in the next ten years.

Now if only I could run macOS with full GPU acceleration on Windows or Linux without needing a separate GPU, then I wouldn't need a Mac for the few times I develop and build for iOS.

[+] Zardoz84|2 years ago|reply
I'm doing exactly that on Debian. And I have a better experience. That it'¡s the real win
[+] tomohelix|2 years ago|reply
Honestly, whoever convinced Microsoft to make Linux run in windows was a genius. I would have seriously considered a Mac had they not done this. It just opens so many possibilities in Windows for me and all of it is so easy and simple to setup.
[+] dboreham|2 years ago|reply
Yes, although that person probably retired long ago since the idea dates back to 1990 or so (NT Posix subsystem). The difference in modern times is someone convinced them to make it usable.
[+] prirun|2 years ago|reply
> Honestly, whoever convinced Microsoft to make Linux run in windows was a genius.

Embrace.

[+] threatripper|2 years ago|reply
The naming causes some confusion to me. I thought there was WSL and then they released WSL2 quite some time ago. Is this WSL1 version 2 or WSL2 version 2?
[+] Reubend|2 years ago|reply
Seems to be WSL 2 v2.0 if I'm understanding correctly. I agree that it's very badly named.
[+] DiabloD3|2 years ago|reply
Its both, WSL1 and 2 are both part of WSL.

Think of this as, kinda, the userland tools for WSL.

[+] deaddodo|2 years ago|reply
WSL2 supplanted WSL. It's a different (but similar) technology with the same (albeit, confusing) name, not a version bump.

This release refers to WSL2 version 2.0.

[+] baq|2 years ago|reply
> experimental.networkingMode - A new networking mode for WSL that adds new features and improves network compatibility

> experimental.dnsTunneling- Changes how WSL resolves DNS requests to improve network compatibility

> experimental.firewall- Applies Windows firewall rules to WSL, and allows for advanced firewall controls for the WSL VM

> experimental.autoProxy- Makes WSL automatically use the proxy information from Windows to improve network compatibility

Had to work around these back in 2020-ish… finally a way to run WSL2 with Cisco VPN without horrible hacks? Fantastic!

[+] WirelessGigabit|2 years ago|reply
If the only VPN that has issues is Cisco's VPN, then Cisco is the problem, not WSL2.
[+] timost|2 years ago|reply
This release improves memory management (automatic reclaim) and network compatibility.
[+] jw_cook|2 years ago|reply
Fantastic! Lack of memory reclaim is one of my main gripes with WSL, so I'm really pleased to see this.
[+] kyriakos|2 years ago|reply
And disk reclaim with sparse vhd
[+] dataflow|2 years ago|reply
So this is WSL2 2.0?
[+] sverhagen|2 years ago|reply
Following it from a distance, I think WSL has been a very exciting development on Windows. It's really something I would probably have enjoyed more upclose, had I not, you know... moved to Ubuntu altogether :)
[+] CJefferson|2 years ago|reply
I'm going to wait a while to see how the new VPN stuff works out. Previously WSL2 didn't work with a Windows VPN without an extra tool ( https://github.com/sakai135/wsl-vpnkit ), hopefully this might fix things, but not going to risk trying it in case it breaks everything.
[+] bafe|2 years ago|reply
This is the most painful aspect of WSL2: if your org forces you to use a VPN your WSL2 is almost totally isolated from the network. Interestingly we have the same problem with our VPN and docker
[+] AndrewDavis|2 years ago|reply
Please correct me if I'm wrong. This isn't a release but a "re-release" right? So only available to those on Windows insider update train?

Putting that aside. I am quite excited about the mirror network change. My big annoyance when I moved from WSL1 to WSL2 was that a service run inside WSL wasn't available to the my LAN. It made sense why it didn't, WSL2 is a hardware VM so you weren't binding on the hosts networking stack like WSL1, but it was still annoying.

[+] throwaway798214|2 years ago|reply
WSL1 is what keeps me on Windows - but I don't understand why they keep calling WSL2 "WSL" as it has nothing to do with the traditional "Windows service for XXX" model. For better or worse WSL2 is just a virtual machine, nothing else, while WSL1 actually integrates with the underlying Windows with a single network stack etc.
[+] kyriakos|2 years ago|reply
Been using wsl2 for development for a long time I don't see how it's not integrated enough with windows. For my use case it seems completely transparent to the fact that it's running in a vm.
[+] Falmarri|2 years ago|reply
Ok, how do I actually install this? `wsl --update` says I'm up to date, but wsl --version` shows `WSL version: 1.2.5.0`.
[+] TheSmiddy|2 years ago|reply
I also had this same issue and found this on the official microsoft blog which also contains info on how to actually enable the new features.

wsl --update; wsl --update --pre-release

https://devblogs.microsoft.com/commandline/windows-subsystem...

EDIT: you also need to be on the latest windows insider build to actually take advantage of the experimental features.

[+] fabian2k|2 years ago|reply
The ability to release memory could be very useful. WSL2 works very well for me in general, but on a Notebook without excessive RAM it can be problematic for some use cases. Anything that has large spikes in memory usage can be seriously annoying as that memory won't be released in the current WSL2.
[+] bakugo|2 years ago|reply
Let me guess, they still haven't fixed the sleep/hibernation bug that has been present for many years?
[+] grumpyprole|2 years ago|reply
This bug makes WSL a pain to use on laptops. I hope it's fixed!
[+] smokel|2 years ago|reply
As others mention, the versioning scheme is confusing. I'd like to add that I found even the name confusing, as I initially thought that this would allow some parts of Windows to run on Linux.

"Linux Subsystem for Windows" would have made a lot more sense to me.

[+] threatripper|2 years ago|reply
Actually WSL doesn't contain any Linux at all because "Linux" originally refers to the Linux Kernel and usually GNU/Linux refers to a system using Linux as a kernel but GNU software for the userspace. So, the Name should rather have been something like "Windows Subsystem for Posix Programs" which doesn't quite sound so good.
[+] idatum|2 years ago|reply
Biggest potential I see with this update is IPv6 support.
[+] mythz|2 years ago|reply
I've been a big fan of WSL, which has kept me on Windows for years more than I otherwise would have. But I'm not a fan of the trend of Windows turning into an adware hosting platform so intend to move to macOS for my primary Desktop after Apple release their next M3 hardware.

As a .NET Developer I bought a new M2 Macbook Air to test the feasibility of moving to ARM/Apple Silicon and was pleasantly surprised that all the software I used daily had native builds that worked OOB [1]. I was also able to run Windows 11, Ubuntu and Fedora ARM OS's with UTM [2], which lets me access Windows should I ever need to.

As nice as WSL is, it's not as nice as having a native Unix terminal as it still feels like your living in 2 different worlds. It's always going to be uncanny valley where you need to install software tools twice per OS (and upgraded in-sync) and the cross-OS file system performance is so unusably slow that it may as well not exist as you're basically forced to check out repos in each filesystem. Also ran into a number of situations where building and using WSL tools isn't as well supported as Linux/macOS.

By contrast everything I tried to install seemed to work on macOS, where I was able to build and try out LadyBird Browser's new native macOS UI [3] and install all the tools I needed run and test out local AI workflows [4], e.g. this command below uses ffmpeg to capture 5s of microphone recording, uses OpenAI's whisper to transcribe the audio to text, uses curl to send it to a remote API to generate an LLM prompt, that gets executed with a local install of Llama2 7B:

    ffmpeg -f avfoundation -i ":1" -t 5 order.mp3 \
    && whisper --language=en --fp16 False --output_format txt order.mp3 \
    && curl --get --data-urlencode "userMessage=$(cat order.txt)" \
    https://coffeeshop.netcore.io/coffeeshop/prompt | llm -m l2c
Maybe you can achieve similar functionality in Windows/WSL, but it's nicer when all the tools you want to use just works natively.

[1] https://servicestack.net/posts/postgres-mysql-sqlserver-on-a...

[2] https://mac.getutm.app

[3] https://twitter.com/awesomekling/status/1694954938395202031

[4] https://servicestack.net/posts/building-typechat-coffeeshop-...