6 ms·
Windows Subsystem for Linux 2.0 release
- timost 3y agoThis release improves memory management (automatic reclaim) and network compatibility.
- jw_cook 3y agoFantastic! Lack of memory reclaim is one of my main gripes with WSL, so I'm really pleased to see this.
- nikau 3y agoYou can dump caches in current wsl2, you just have to dump a value into a /proc file to trigger it
- dataflow 3y agoSo this is WSL2 2.0?
- kyriakos 3y agoAnd disk reclaim with sparse vhd
- threatripper 3y agoThe 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 3y agoSeems to be WSL 2 v2.0 if I'm understanding correctly. I agree that it's very badly named.
- corbezzoli 3y agoTaking inspiration from USB
- deaddodo 3y agoWSL2 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.
- creakingstairs 3y agoDoes MS have an internal memo or something that directs teams to make versions/names not go up linearly? E.g. .net framework/core, xbox, windows and now WSL
- DiabloD3 3y agoIts both, WSL1 and 2 are both part of WSL. Think of this as, kinda, the userland tools for WSL.
- Semaphor 3y agoMicrosoft being bad with naming/versioning things? Wow. Totally made up conversations about choosing Entity Framework version numbers: https://blog.oneunicorn.com/2020/03/26/numbersarehard/ https://blog.oneunicorn.com/2020/03/26/numbersarehard/
- sverhagen 3y agoFollowing 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 :)
- wtallis 3y ago... 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)
- deleted 3y ago[deleted]
- winternewt 3y agoI'm confused. Is this WSL1 version 2.0? Or WSL2 version 2.0?
- wtallis 3y agoThe answer is either no, or both.
- hx8 3y agoOr is WSL 1 and WSL2 shipped in a package called "WSL" that just reached version 2.0
- tapoxi 3y agoThis is WSL version 2.0 which contains WSL 1 and WSL 2, and though it's a Windows Subsystem for Linux it's actually a Linux Subsystem for Windows. How are they so bad at naming things?
- oktoberpaard 3y agoWith WSL 1 there is no Linux involved, it’s a Windows subsystem to handle Linux system calls with the NT kernel. I sort of get the name in that regard. WSL 2 is just a tightly integrated VM running a real Linux kernel, and the name makes no sense there.
- thefz 3y ago
- cloudking 3y agoDeveloping code in the same OS you play Baldur's Gate 3 in is the real win. Thanks Microsoft
- pynappo 3y agobg3 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.
- Zardoz84 3y agoI'm doing exactly that on Debian. And I have a better experience. That it'¡s the real win
- satvikpendem 3y agoI 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.
- CoolCold 3y agoSome people afair run hackintosh inside KVM in WSL2, may be that's what you need
- satvikpendem 3y agoNo GPU acceleration through that, unless something recently changed.
- tomohelix 3y agoHonestly, 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.
- john61 3y agohttps://www.cygwin.com/ https://www.cygwin.com/ is available since 1995
- CJefferson 3y agoCygwin was a great tool, and I've released some software which used cygwin, but almost all large programs ended up needing cygwin-specific patches (I maintained quite a few myself), while WSL2 (which is just a fancy VM), in my experience offers 100% linux compatibility, I've never had any issues with it except some VPN-related internet problems.
- rstuart4133 3y ago> I've never had any issues with it except some VPN-related internet problems. I've had to support a development environment that ran on WSL2, among other things. I regularly had developers attempt to start work in the morning only to find an overnight WSL2 update from Microsoft rendered their WSL2 instance unusable. It typically took a few hours of uninstalling / reinstalling to fix it. But in at least one case after a series of these incidents that cumulated in them spending a day trying to get it going they gave up and switched to Ubuntu. The only reason I'd use WSL2 over a real Linux install for Linux development is because of ISO 27001 / SOC 2 restrictions pushed from above. I don't have a clue why people would do it voluntarily. It's not only a fragile and incomplete implementation (especially on the networking side), it's also noticeably slower.
- Falmarri 3y agoAbsolutely this. It's usable, but just barely, and not even close to a replacement for a real linux system
- CJefferson 3y agoI'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 https://github.com/sakai135/wsl-vpnkit ), hopefully this might fix things, but not going to risk trying it in case it breaks everything.
- bafe 3y agoThis 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
- CJefferson 3y agoIf you haven't looked at it, look at the wsl-vpnkit (I mentioend above). Your org might not like it of course, but I found it fixed all my VPN-related issues (it's just another linux install you run as part of WSL2, which somehow connects everything together and by magic lets me get on the internet fine).
- bafe 3y agoI do use it and it works. Luckily I also got a full Linux PC for when I work from home, therefore I only need WSl the few times I am going to the office. The main issue now is the VPN messing up with routing and making containers inside WSL inaccessible from outside. Unfortunately wsl-vpnkit couldn't help there...
- hackandthink 3y agoPodman user mode networking may help. --user-mode-networking https://docs.podman.io/en/latest/markdown/podman-machine-init.1.html https://docs.podman.io/en/latest/markdown/podman-machine-ini...
- AndrewDavis 3y agoPlease 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.
- bakugo 3y agoLet me guess, they still haven't fixed the sleep/hibernation bug that has been present for many years?
- grumpyprole 3y agoThis bug makes WSL a pain to use on laptops. I hope it's fixed!
- ssdspoimdsjvv 3y agoWhich bug is that?
- timost 3y agoI think it's this bug https://github.com/microsoft/WSL/issues/8696 https://github.com/microsoft/WSL/issues/8696 A real nightmare.
- bakugo 3y agoThere are several issues in the repo related this bug, here's another one with over 500 comments: https://github.com/microsoft/WSL/issues/6982 https://github.com/microsoft/WSL/issues/6982 Almost 1000 total comments between both of these and basically no acknowledgement from microsoft.
- deleted 3y ago[deleted]
- idatum 3y agoBiggest potential I see with this update is IPv6 support.
- baq 3y ago> 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 3y agoIf the only VPN that has issues is Cisco's VPN, then Cisco is the problem, not WSL2.
- baq 3y agoMaybe. Cisco VPN predates wsl by a couple millennia, so it’s hard to say who’s at fault here. Not sure about other corporate VPN providers, haven’t used them. I wouldn’t be surprised if others have similar issues.
- smackeyacky 3y agoWsl-vpnkit is what we use so we can work with horrible proxy setups. It works well.
- baq 3y agoGuess that makes me a dinosaur, I had to parse the WPAD in shell/awk to get anything working and haven't looked after that ;)
- fabian2k 3y agoThe 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.
- smokel 3y agoAs 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 3y agoActually 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.
- smokel 3y agoThis was true for WSL1, but WSL2 does contain a Linux kernel. The source code for it is available at: https://github.com/microsoft/WSL2-Linux-Kernel https://github.com/microsoft/WSL2-Linux-Kernel
- Falmarri 3y agoOk, 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 3y agoI 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-for-linux-september-2023-update/ 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.
- mythz 3y agoI'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-apple-silicon https://servicestack.net/posts/postgres-mysql-sqlserver-on-a... [2] https://mac.getutm.app https://mac.getutm.app [3] https://twitter.com/awesomekling/status/1694954938395202031 https://twitter.com/awesomekling/status/1694954938395202031 [4] https://servicestack.net/posts/building-typechat-coffeeshop-gpt#local-ai-workflows https://servicestack.net/posts/building-typechat-coffeeshop-...
- throwaway798214 3y agoWSL1 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 3y agoBeen 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.
- throwaway798214 3y agoSeparate network stacks? Separate filesystems? Separate processes and memory allocation? With WSL1 processes started from WSL console appear on Windows Task manager and starting a network daemon on WSL1 uses the Windows network stack and firewall. There's no NAT, no bridging and no VPN problems as you truly are running just a single operating system. WSL2 using but not releasing memory? Not a problem with WSL1 as it doesn't allocate any memory, it just runs processes on top of Windows kernel. Of course WSL1 has it's limitations as it's not Linux but Windows with Linux userland - anything that touches the Linux kernel directly pretty much doesn't work (like loop mounts etc).
- hs86 3y agoCorresponding blog post: https://devblogs.microsoft.com/commandline/windows-subsystem-for-linux-september-2023-update/ https://devblogs.microsoft.com/commandline/windows-subsystem...