Live data from Hacker News

Initial Impressions of WSL 2

daverupert.com

21–30 of 233 posts

Re: Initial Impressions of WSL 2

#21
post #15
post #4

Earlier quoted context omitted.

How does it compare to real Linux distributions? Does it have a package manager? Is it like Debian? What are the limitations?

WSL gives you a full Linux distro. You can use Debian, Fedora, Ubuntu, from the top of my head. These are default options. There are others available. Additionally, you can bootstrap to other distros. I know Arch was an early target. WSL1 replaced the init process. For Ubuntu, at least, snaps were not enabled, at least out of the box. There were occasional issues early on where the syscall translation was not perfect…

There were 4 "standard" distros in the Microsoft store IIRC

Re: Initial Impressions of WSL 2

#22
post #12

That's great news, thinking about replacing my Ubuntu Linux install for Windows and having WSL2 if these changes and performance improvements are accurate. Windows Terminal looks pretty cool too, reminds me of Terminal.app on macOS with blurred backgrounds and theming too. Very cool blog post!

I've done exactly that. I had some issues with WSL but WSL2 does what I need it to do. Specifically what I need it to do is cross-compile the linux kernel (among other things) for embedded devices. This works flawlessly.

Almost all my work has moved to WSL - the remaining bit (like UART and JTAG access) could be done with better USB support. So I'm definitely hoping for that!

Re: Initial Impressions of WSL 2

#23

> Those pain points were solved in WSL 2 by embedding a whole first-party Linux VM inside Windows Wait so now it's just a regular Linux virtual machine? I thought it was a thin translation layer between the kernels? Kinda not as impressive now.

Yeah don't get too excited, it's just a VM. The disk usage doesn't automatically shrink with usage, and I'm not sure if RAM does either (interested in knowing if they've done anything related to that), which were what I found most useful about WSL1. I wish they'd instead put all their effort from this into legitimately fixing the issues in WSL1 instead.

Re: Initial Impressions of WSL 2

#24
post #4

Earlier quoted context omitted.

How does it compare to real Linux distributions? Does it have a package manager? Is it like Debian? What are the limitations?

WSL2 is a full blown emulator / virtualization solution, so it runs a real linux kernel / distribution. The largest downside to me is no gpu passthrough from the host.

They say GPU passthrough is on the backlog in their post build FAQ. https://devblogs.microsoft.com/commandline/wsl-2-post-build-...

Re: Initial Impressions of WSL 2

#25

I must say WSL2 has genuinely been huge for me, to the point where I've finally been able to ditch macOS for a desktop with a Ryzen CPU. Honestly it's mindblowing how far Windows has come - if I were Apple I'd genuinely be scared of losing a large proportion of power-users as Windows becomes an increasingly viable platform for development.

I've also switched from Mac to a Ryzen desktop. So far the experience has been extremely good and performance is amazing. Been working with clojure and react native on WSL2 several months now.

I didn't want it to be this way though. Apple has been continuously pushing out laptops that are not what I want. My Mac is also notifying me nonstop about 2FA authentication and iCloud storage, and I can't seem to turn those off. I used to eagerly await their keynote events to see what cutting edge innovations they will announce. There have been none I care about since Steve passed.

The lack of a decent modern laptop (I just want a proper keyboard without touchbar, some ports, with a decent cooling system) and MacOS becoming more buggy and annoying has pushed me to find an alternative.

WSL1 did not cut it for me, but WSL2 has taken Apple out of my mind entirely with regards to my development environment.

Re: Initial Impressions of WSL 2

#26

> Those pain points were solved in WSL 2 by embedding a whole first-party Linux VM inside Windows Wait so now it's just a regular Linux virtual machine? I thought it was a thin translation layer between the kernels? Kinda not as impressive now.

It's not quite a regular VM, like what users themselves can create, but deeply integrated. But it's based upon Hyper-V, that's correct.

It is technically less impressive, but much easier to maintain and stay compatible for Microsoft.

Re: Initial Impressions of WSL 2

#27

> Those pain points were solved in WSL 2 by embedding a whole first-party Linux VM inside Windows Wait so now it's just a regular Linux virtual machine? I thought it was a thin translation layer between the kernels? Kinda not as impressive now.

Here's the diagram - https://i.redd.it/po98dksksjx21.png

It's only running alongside Windows in the sense that it's running in Hyper-V, which Windows itself effectively does when you have Hyper-V enabled. What is special about this Linux build is that it's specifically made for running alongside Windows since it needs to integrate with the Explorer and other Windows components[0].

0: https://devblogs.microsoft.com/commandline/shipping-a-linux-...

Re: Initial Impressions of WSL 2

#29
post #3

No free lunch, of course. Faster file access with WSL2 (vs WSL1), if you stay in the Linux world. But if you point it at Windows files (/mnt/c, etc), it's pretty slow. WSL2 just moved the slowness from one side to the other. Accessing the Linux FS from Windows (\\wsl$\) is also slow. That said, I am a fan, and get a lot of use out of WSL1. Since I don't use the Windows interop much, WSL2 should be a performance win f…

Yep.

With WSL I can seamlessly access files from both Linux and Windows. I use the Terminal (Windows) and various Unix tools for a lot of stuff (compiling & testing on Posix, objdump, debugging). And I use Windows GUI tools for editing (Sublime), diffing (BeyondCompare), and so on. I get the best of both worlds.

But WSL2 file access in `/mnt/c/` is now unbearably slow. So I just stick with WSL1.

From what I've read, Microsoft intends to support both WSL1 and WSL2 for the foreseeable future. So that's good.

Re: Initial Impressions of WSL 2

#30

> Those pain points were solved in WSL 2 by embedding a whole first-party Linux VM inside Windows Wait so now it's just a regular Linux virtual machine? I thought it was a thin translation layer between the kernels? Kinda not as impressive now.

Yup it’s not as impressive technically, but it’s a huge improvement for what developers have actually been using it for.
Post reply on HN