News for hackers. Stuff that matters.
Re:WSL2 can now mount Linux ext4 disks directly by TheRealDunkirk on Tuesday November 09, 2021 @07:19AM (#29160699)
I'm still trying to understand the use case. I've been at this for 27 years (or 40, depending on where you want to start), and I just can't understand why anyone cares about WSL2. If you need a Linux VM, I have no idea why you wouldn't run a full-blown VM software like Fusion or VitualBox, and have total control over the emulation, but I guess that comes down to preference. Who here is writing software which runs on Linux, yet needs to be running Windows while they do it? What sort of application is that? What's that software development cycle?
Re:WSL2 can now mount Linux ext4 disks directly by simonh on Tuesday November 09, 2021 @07:30AM (#29160822)
You can launch into a WSL shell in seconds without having to wait for a VM to spin up. WSL doesn't run the full slew of linux processes and uses the same memory space, so both CPU and memory utilisation is much lower than a VM. You don't need to contend with all the fiddly configuration parameters and config of VM software, and it integrates into the Windows environment by default, again without fiddly configuration.

If you're doing sysadmin work or web development, and need to run Windows software as well or are on hardware with better Windows support, it's hard to see why you wouldn't use WSL.

To your point on total control of the emulation, not everybody needs that. If your use case means you need a real Linux OS environment, then sure, WSL isn't for you.

Re:WSL2 can now mount Linux ext4 disks directly by TheRealDunkirk on Tuesday November 09, 2021 @07:34AM (#29160876)
> WSL doesn't run the full slew of linux processes and uses the same memory space, so both CPU and memory utilisation is much lower than a VM.

Well, I thought this was the case with WSL, but that WSL2 changed this, such that it's really just a full-blown VM now. Are you saying that you're still using WSL 1, or have I misunderstood the nature of WSL2?

Re:WSL2 can now mount Linux ext4 disks directly by jve on Tuesday November 09, 2021 @07:39AM (#29160924)
WSL2 still runs instantly. I haven't been bothered with waiting. I tried wsl --shutdown and then opening wsl - didn't take a second. Cold boot may have been longer, but I don't remember being bothered with startup times. However older powershell console startup time did bother me for sure.
Re:WSL2 can now mount Linux ext4 disks directly by alxlaz on Tuesday November 09, 2021 @07:38AM (#29160912)
Neither :-). WSL2 runs a full-blown machine but the startup process is considerably different from that of a real machine with a real Linux installation, so when you "start up" a WSL2 shell, it's spawned in seconds, you're already logged in and so on. It's essentially the WSL1 presentation format but with a different back-end.
Re:WSL2 can now mount Linux ext4 disks directly by girvo on Tuesday November 09, 2021 @08:35AM (#29161504)
Though my Ubuntu VM on Hyper-V with multipass giving the Microsoft Terminal integration started up basically just as fast, to be honest.

But the deeper integration and lighter underlying OS for WSL2 is better, especially for Docker dev container usage with VSCode.

Re:WSL2 can now mount Linux ext4 disks directly by vbezhenar on Tuesday November 09, 2021 @07:52AM (#29161068)
> You can launch into a WSL shell in seconds without having to wait for a VM to spin up.

Start VM in background at boot time and ssh in milliseconds when necessary.

> WSL doesn't run the full slew of linux processes

I don't know what linux processes are you talking about, but minimal Linux ram consumption is something like 50 MB, that's hardly noticeable.

> uses the same memory space

RAM ballooning is available in VirtualBox or Vmware for years.

> CPU utilisation is much lower than a VM

I don't think that's true. There's no inherent CPU utilization in Linux (and WSL2 is VM).

> You don't need to contend with all the fiddly configuration parameters and config of VM software, and it integrates into the Windows environment by default, again without fiddly configuration.

And that's probably the main reason why WSL is so popular. Installing VM software, creating virtual machine with proper configuration, installing guest tools, configuring it to start/stop at host OS boot/shutdown, configuring shortcuts for ssh is out of reach for most developers and power users. WSL just simplified that process. Probably could be implemented with some wrappers around VBoxManage years ago, but nobody understood the problem.

Re:WSL2 can now mount Linux ext4 disks directly by NikolaNovak on Tuesday November 09, 2021 @08:02AM (#29161159)
Interesting; different perspectives I suppose; not the OP, but for myself too VM always seemed an easier and cleaner solution:

1. Isn't WSL2 now actually a VM too? My biggest deal breaker with WSL2 is that it moves my main Windows into now a parent VM over the Type 1 hypervisor; making everything else in my main Windows just that little bit wonkier. Worse, this information isn't as readily easily grokkable as I feel it should be. I.e. if somebody isn't comfortable installing a clean, separate VM in Virtualbox, they may be even less aware of consequences of moving their main Windows installation into a VM now.

2.Re fiddliness: Installing Ubuntu into VIrtualbox has always seemed trivially easy; and there's any number of downloadable pre-built images from safe sources. Whereas figuring out how to access Windows filesystem from WSL2 and vice versa; let alone installing GUI tools - always seemed completely opaque to me with any number of half-built, quarter-supported guides and solutions out there. And I never seem to know or guess correctly what subset of Linux functionality will or will not work, normally or differently.

Re:WSL2 can now mount Linux ext4 disks directly by sixbrx on Tuesday November 09, 2021 @09:08AM (#29161899)
I think #1 (running Windows itself via HyperV) is just the direction Windows is going anyway, and WSL2 is just one of the features that require it. Another one that requires it is the "Windows Defender Application Guard" which can isolate browser instances and other stuff.

https://techcommunity.microsoft.com/t5/virtualization/hyper-...

Re:WSL2 can now mount Linux ext4 disks directly by dboreham on Tuesday November 09, 2021 @08:24AM (#29161386)
> moves my main Windows into now a parent VM over the Type 1 hypervisor

Are you sure about this? It seems unlikely that NT would change significantly depending on whether or not it is hosting a WSL2 guest. I've never noticed anything different about my Windows since using WSL2.

> Windows filesystem from WSL2 and vice versa

/mnt/C/

\\wsl.localhost\Ubuntu

Re:WSL2 can now mount Linux ext4 disks directly by hadik on Tuesday November 09, 2021 @08:36AM (#29161513)
WSL2 is architecturally designed to run under Hyper-V, so when you activate WSL2 on your machine, Hyper-V runs on bare metal and your Windows installation just becomes another VM running inside it next to the WSL2 Linux environment. Unfortunately this is imho not explained as well as it should be, because, while most of the time most people won't notice any difference, there is a measurable impact with regards to performance (in games, for example). It depends on your specific setup how bad it gets, and in most cases it's more of a theoretical performance hit than a noticeable one, but it is still there.
Re:WSL2 can now mount Linux ext4 disks directly by freefolks on Tuesday November 09, 2021 @09:49AM (#29162444)
It downclocks my ram to 800mhz if I enable vt in bios. My new cutting edge system turns into a pentium 4. Apparently this is a bug with windows 11. Hope it gets fixed
Re:WSL2 can now mount Linux ext4 disks directly by NikolaNovak on Tuesday November 09, 2021 @10:17AM (#29162815)
As I said, it is NOT documented well; and even when you do confirm that WSL2 engaged Hyper-V, the ramifications are even more poorly explained.

But yes, everything I've read and experienced indicates that:

1. WSL2 IS a VM and it necessitates installation of certain portions of Hyper-V, which as Type-1 hypervisor, means your primary windows partition is no longer bare-metal but rather now a parent virtual machine.

2. This has impact on running other Type 2 hypervisors such as VirtualBox or VMWare etc; as well as some types of performance-intensive applications and games.

https://docs.microsoft.com/en-us/windows/wsl/faq

Re:WSL2 can now mount Linux ext4 disks directly by morpheuskafka on Tuesday November 09, 2021 @08:36AM (#29161510)
It is true for any system that has Hyper-V enabled and should work perfectly fine. Same as if you have a Windows VM guest or a traditional Linux VM. WSL2 uses and manages a small VM under the hood so enabling it will cause this change to the windows boot process if it was not already so.
Re:WSL2 can now mount Linux ext4 disks directly by girvo on Tuesday November 09, 2021 @08:40AM (#29161565)
Yeah it actually does. Crazy, I know.

They’re also doing the same for Windows 11 by default now too I believe.

> In addition, if you have Hyper-V enabled, those latency-sensitive, high-precision applications may also have issues running in the host. This is because with virtualization enabled, the host OS also runs on top of the Hyper-V virtualization layer, just as guest operating systems do.

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-w...

Re:WSL2 can now mount Linux ext4 disks directly by fretn on Tuesday November 09, 2021 @08:23AM (#29161375)
Can you give some more info about your first point, where your main Windows is moved into a parent VM ?
Re:WSL2 can now mount Linux ext4 disks directly by NikolaNovak on Tuesday November 09, 2021 @10:30AM (#29163000)
Sure:

1. https://docs.microsoft.com/en-us/windows/wsl/faq

"The newest version of WSL uses Hyper-V architecture to enable its virtualization"

A little bit of detail on impact, but incomplete/generic.

2. https://docs.microsoft.com/en-us/windows-server/administrati...

"Hyper-V features a Type 1 hypervisor-based architecture. "

Re:WSL2 can now mount Linux ext4 disks directly by girvo on Tuesday November 09, 2021 @08:41AM (#29161577)
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-w...

Has some basic info, worth a read.

> In addition, if you have Hyper-V enabled, those latency-sensitive, high-precision applications may also have issues running in the host. This is because with virtualization enabled, the host OS also runs on top of the Hyper-V virtualization layer, just as guest operating systems do.

Re:WSL2 can now mount Linux ext4 disks directly by formerly_proven on Tuesday November 09, 2021 @08:27AM (#29161409)
That's just how Hyper-V (Microsofts VM hypervisor) works, it's a type 1 (bare metal) hypervisor, where everything else runs in a VM.
Re:WSL2 can now mount Linux ext4 disks directly by allendoerfer on Tuesday November 09, 2021 @08:04AM (#29161177)
> Probably could be implemented with some wrappers around VBoxManage years ago, but nobody understood the problem.

I'd say vagrant did something in that area.

Re:WSL2 can now mount Linux ext4 disks directly by nikau on Tuesday November 09, 2021 @07:20PM (#29169446)
I think the biggest advantage of WSL2 is being off the radar - corporate IT support will just be "oh its a Microsoft product, install approved, add to whitelist in all security monitoring products".

Rolling your own implementation with vmware poses the exact same security and compliance risks, but its way more likely to put a spotlight on you.

Re:WSL2 can now mount Linux ext4 disks directly by cle on Tuesday November 09, 2021 @08:01AM (#29161144)
From a legal perspective it’s probably best to avoid any Oracle IP.

(I still agree with your overall point though.)

Re:WSL2 can now mount Linux ext4 disks directly by simonh on Tuesday November 09, 2021 @08:57AM (#29161763)
Processes like systemd. Does the average developer or sysadmin really pare their Linux down to 50mb?

Look, if you want to tune your VM exactly to your liking then use a VM. It will give you a lot more control.

Re:WSL2 can now mount Linux ext4 disks directly by yakubin on Tuesday November 09, 2021 @07:45AM (#29160992)
> You can launch into a WSL shell in seconds without having to wait for a VM to spin up.

Serious question: how long does it take to spin up a VM on Windows then? Does it take seconds?

(Not disputing your other points.)

Re:WSL2 can now mount Linux ext4 disks directly by tehbeard on Tuesday November 09, 2021 @08:09AM (#29161229)
For a "cloud image" I have in virtualbox (so no gui) for testing cloud-init/ansible, about 15-20 seconds.

WSL1 takes about a second, and I'm pretty sure most of that is the init script that spits out network/update info.

Re:WSL2 can now mount Linux ext4 disks directly by Bayart on Tuesday November 09, 2021 @07:52AM (#29161063)
>I have no idea why you wouldn't run a full-blown VM software like Fusion or VitualBox

Integration etc. It's just much faster and easier to pop up a terminal window straight into a shell on WSL than it is doing the same through a third party virtualization system.

>Who here is writing software which runs on Linux, yet needs to be running Windows while they do it?

Me ? Enough people that it justifies putting time into WSL and adjunct software (Windows Terminal) ?

There's certainly enough software on Windows that I need, especially on the audio/video front but also stuff like Visual Studio for my C# code. And there's UNIX software I equally need (headless vim and anything that runs on the CLI). It's a near perfect fit for me.

Re:WSL2 can now mount Linux ext4 disks directly by nikau on Tuesday November 09, 2021 @07:23PM (#29169474)
Even just the fact you can run windows binaries from wsl2 is a killer feature, its nice being able to run something like tasklist.exe and process the stdout in bash.

Sure you could write a similar script in Powershell or cmd, but its a headache I don't need.

Re:WSL2 can now mount Linux ext4 disks directly by Bayart on Wednesday November 10, 2021 @08:27AM (#29174370)
I hadn't even thought of that, though I did start the odd Windows .exe from the WSL. Is it usable for actual Windows sysadmin stuff (I mean as the main shell, as opposed to Powerwhell) ?
Re:WSL2 can now mount Linux ext4 disks directly by nikau on Saturday November 13, 2021 @12:38AM (#29207710)
Anything that uses stdin/stdout will work fine
Re:WSL2 can now mount Linux ext4 disks directly by emptyfile on Tuesday November 09, 2021 @07:56AM (#29161101)
> Who here is writing software which runs on Linux, yet needs to be running Windows while they do it?

I do, because desktop Linux is a pile of burning garbage. Do we really have to reiterate this point every time?

Never been happier in my job then the day I realized I can run my full Linux dev environment on Windows.

If you folks like spending your free time configuring Linux or virtual boxes on Windows, feel free to do so. But please don't act like "you just don't understand". I don't wanna debug the OS in my free time, I would rather go hiking.

Re:WSL2 can now mount Linux ext4 disks directly by jasonjayr on Tuesday November 09, 2021 @08:18AM (#29161319)
Some of us are also unwilling to put up with Microsoft's increasing app-ification of the OS, and are willing to put up with a little jankiness in order to ensure we are on a free software stack.

And we still have time for hiking.

Re:WSL2 can now mount Linux ext4 disks directly by emptyfile on Tuesday November 09, 2021 @12:32PM (#29164607)
Well good for you people.

For me, when I buy a new laptop and half the drivers aren't working, that's an immediate deal breaker.

I literally won't allow myself to get into that situation again, not for love or money.

Re:WSL2 can now mount Linux ext4 disks directly by trelane on Tuesday November 09, 2021 @12:47PM (#29164822)
I'd you buy a Linux laptop and it's not working out of the box, you should return it.
Re:WSL2 can now mount Linux ext4 disks directly by dkersten on Tuesday November 09, 2021 @08:09AM (#29161231)
> desktop Linux is a pile of burning garbage.

Purely subjective. I personally think that Windows is a pile of burning garbage, YMMV obviously.

My own desktop linux experience in the past ~5 or so years has actually been better than my Windows experience. Nowadays, I use a mix of Linux and OS X with a lot more time spent on Linux[1] and I'm very happy. The only thing I consider perhaps installing Windows for some day is games, but between SteamOS and Proton, even that is very low on my priority list and if I did want to do it, I'd probably install it in a VM with GPU passthrough rather than running it directly.

I've been using Linux in various capacities (at home, not just on servers) since maybe 2006 or 2007, sometimes as my primary system, sometimes dual booting, sometimes in VirtualBox, but I've pretty much switched away from Windows entirely (last time I had a Windows install was 2015) and while I have a Macbook I use, my primary machine is a Dell XPS running Linux. I wouldn't even consider using Windows anymore, I've never been happier than when I left it behind for good.

> If you folks like spending your free time configuring Linux

I see people who don't use Linux say this, but its just not true. I spend exactly zero time configuring Linux, outside a half a day of initial setup (which, when I used Windows, is also how long I'd spend setting that up after an initial install) and much of that is largely because I can configure it to suit my particular tastes, not because I have to, outside installing a some stuff from the package manager (but again, I'd have to install the software I want on Windows too). Sure I spend more time on the commandline doing this than you might on Windows, but I prefer the commandline so it feels largely a choice rather than a necessity. I spent just as much time "fiddling" with drivers and settings on my last install of Windows as I have with my current install of Linux. I actually have a very low tolerance for dealing with shit not working.

> I don't wanna debug the OS in my free time

I've had more bugs in my last year of using Windows than I have in my previous year of using Linux. I've had to debug more Windows issues on family members laptops than I've ever had on my current Linux laptop.

I personally don't want to deal with all the live tiles and advertisements that Windows had on my mothers laptop. With Linux, I have nothing that I don't want (and if a distro installs stuff I don't want by default, its usually trivial to remove).

[1] As of about 2 years ago, prior to that the split was reversed, but that was largely due to my work at the time.

Re:WSL2 can now mount Linux ext4 disks directly by dkersten on Wednesday November 10, 2021 @09:07AM (#29174753)
I should add that the only times I do end up "tinkering" with my Linux setup is when I do very out of the ordinary stuff, that is either not easily done in Windows or would require an equal amount of tinkering. For example, much of my "first day" setup is because I like a keyboard-centric environment, so I set up Sway (with a semi-non-standard config) and related things. Manjaro lets me set up a number of environments with good defaults, if I stick with those, then my initial setup is just down to installing the applications I need (which you also have to do in Windows). Its only when I want to do non-standard out of the ordinary or highly customised stuff to suit my preferences that I may need to tinker, but if I have a non-standard workflow on Windows, I also have to tinker. To get a tiling-WM style keyboard first experience under Windows, I also had to tinker and configure and install stuff, and, at least last I used Windows, I never quite had the control to get the workflow I wanted, so I actually spent more time tinkering (and then giving up and going with the closest match I could get) than I do on Linux, where the tools are replaceable and configurable enough to get pretty close to what I want without too much work.

So I only tinker when I choose to, in order to customise things that are either not possible in Windows, or would require just as much (or even more) tinkering on Windows. That's not a con for Linux, if anything its a pro. Its purely optional.

The only parts where people may spend time tinkering with Linux that I'd consider a con is to get unsupported hardware to work, but that's only easier on Windows if the hardware comes with Windows drivers. If there are no good Windows drivers available, your out of luck and no amount of tinkering will likely get it working. But its been years since this has been something I needed to do on Linux (but I also do a quick search online to check that my hardware has Linux drivers before buying hardware, but those 5 minutes are hardly "tinkering").

Interestingly, I recently bought a cheap drawing tablet and it actually works better on Linux than it does on OS X when using the official drivers (but Linux default tablet drivers support basic functionality out of the box and the OSS Digimend drivers may be getting support soon to, going by the github issues).

Re:WSL2 can now mount Linux ext4 disks directly by swayvil on Tuesday November 09, 2021 @08:34AM (#29161494)
I installed Linux for a couple old ladies. Debian (Mate) on old desktops so they could browse the web and write. Zero issues. Fast and dead stable. They love it.

And installation was a no-brainer.

One service call, dead power supply, in 6 years.

Re:WSL2 can now mount Linux ext4 disks directly by girvo on Tuesday November 09, 2021 @08:47AM (#29161632)
My non technical girlfriends main PC is a 2011ish iMac running Mint. She loves it, zero issues, has never even needed me to look at it. Surprisingly stable for how old a machine it is.

Reckon I’ll swap in an SSD at some point because the decade old spinning rust has to be on its last legs at this point.

Re:WSL2 can now mount Linux ext4 disks directly by dspillett on Tuesday November 09, 2021 @09:35AM (#29162258)
> Reckon I’ll swap in an SSD [for the] decade old spinning rust

I don't know if Mint's arrangement will be as sensitive to it as Windows, but when we swapped an old SSD of mine into a friend's laptop the boost it was enough to quickly take it from “this thing needs to go in the bin after a meeting with a lump hammer” to being her main workhorse.

Re:WSL2 can now mount Linux ext4 disks directly by stevesimmons on Tuesday November 09, 2021 @08:32AM (#29161463)
> Who here is writing software which runs on Linux, yet needs to be running Windows while they do it?

Anyone whose job also involves writing Word docs, PPT presentations, Excel spreadsheets and Visio diagrams, and communicating via Teams. The web versions are very much second-class citizens to the Windows applications.

> desktop Linux is a pile of burning garbage

That's not my experience at all. I have two nearly identical Dell XPS13 laptop. My Windows 11 laptop is considerably more unstable than the Ubuntu 21.10 one.

Now I'm in Windows most of the time, I am constantly reminded of little Win annoyances...

For instance, inability to rename an open file.

Or updates. Updates on the Ubuntu one take a few seconds, and rarely need a reboot. Updates on the Windows one take more like 20 minutes and always need a reboot, which itself takes 5 minutes or so.

Re:WSL2 can now mount Linux ext4 disks directly by teh_klev on Tuesday November 09, 2021 @12:03PM (#29164251)
> For instance, inability to rename an open file.

That depends on whether the app that opened a file holds a lock or not. For example you can rename an open file in notepad or VSCode.

Re:WSL2 can now mount Linux ext4 disks directly by nikau on Tuesday November 09, 2021 @07:30PM (#29169522)
Its an architectural difference by locking filename rather than the inode, and its one of the most annoying "features" of Windows.

Maybe there are some apps that release the lock, but 99% of windows apps lock the filename, and its part of the "reboot after installation" dance for a lot of things.

Re:WSL2 can now mount Linux ext4 disks directly by girvo on Tuesday November 09, 2021 @08:45AM (#29161609)
I agree! Which is why I dislike Windows as well: I’ve lost too much of my life to debugging it’s arcane issues.

Even macOS is starting to grate at times the last few years for similar reasons. I don’t think I like any desktop OSes these days, but running Ubuntu requires the least effort for what I do (and basically no debugging, at least for the last few years), so between it and my Mac it’s been a bit better.

I just had to forcibly uninstall wireless drivers to attempt to upgrade them (with multiple reboot cycles in between, yuck) all to attempt to fix wifi issues (following advice from Metabox’s support team) on my Windows laptop.

It didn’t work. Still garbage. Works great under Ubuntu though.

Re:WSL2 can now mount Linux ext4 disks directly by coldpie on Tuesday November 09, 2021 @09:27AM (#29162145)
At this point, all three platforms are their own unique dumpster fires. Everyone has carved out their little living spaces in the corners of their preferred dumpsters, and denigrating others because they prefer this dumpster instead of that dumpster isn't really interesting or productive.

The only winning move is not to play. Throw your computer in the trash, go for a hike, and never come back.

Re:WSL2 can now mount Linux ext4 disks directly by teh_klev on Tuesday November 09, 2021 @12:06PM (#29164284)
Thank you. I use Windows and Linux daily for development and both provide equal amounts of FFfffffuuuuu....!! moments.
Re:WSL2 can now mount Linux ext4 disks directly by mehphp on Tuesday November 09, 2021 @07:28AM (#29160806)
For me personally, it's just ease of use. I can open a terminal, type `wsl` and it "just works".

I use a mac for my job by at home I have a Windows PC and using WSL has been great to use for my side business/projects.

I have no need for "total control" over the emulation. I much prefer linux to the windows command line and this gives me that.

Re:WSL2 can now mount Linux ext4 disks directly by TheRealDunkirk on Tuesday November 09, 2021 @07:45AM (#29160990)
> I have no need for "total control" over the emulation.

A lot of people are saying this, and I guess I just have a mental block. Full-blown emulation was the only game in town for 20 years. Plus there was the 6 years I ran lots and lots of KVM's. I suppose I'm just used to it.

Re:WSL2 can now mount Linux ext4 disks directly by sharikous on Tuesday November 09, 2021 @09:15AM (#29161977)
Of course if you are so used to it you may not see the benefits, it's like those people who have crafted their vim/emacs environments and do not appreciate IDE advancements.

But if you think about the occasional user, the new user, the one who does not have such an experience it's like sky vs earth.

In VMs you have to think about a lot of things. Mounting external filesystems, bridging the network, starting and stopping the machine, GPU integration, copy/paste, guest additions, headless vs screen (what screen? do you need a VNC instance?) and so on. It's overwhelming and even dangerous (did you do "rm -rf /directory" withour remembering you mounted your whole host filesystem there? oh my..)

All this stuff is greatly simplified with a lot of Microsoft engineering time that went behind it. Linux processes are very integrated with Windows ones, you install everything with one command, it "just works", and, being target at programmers, all the developing tools stuff work seamlessly.

So yes, for a lot of users it's a huge deal

Re:WSL2 can now mount Linux ext4 disks directly by ghshephard on Tuesday November 09, 2021 @08:05AM (#29161186)
All of our solution architects on Windows Systems that require Unix Utilities run WSL - none of them even considered running virtualbox/vmware. I can think of a couple reasons. The first is that there is zero learning curve to installing Ubuntu - they have a hundred things they need to learn, and futzing with virtual machines/installing linux is one less thing they have to deal with. The second is seamless integration between their windows applications and linux file system.
Re:WSL2 can now mount Linux ext4 disks directly by jasode on Tuesday November 09, 2021 @08:57AM (#29161774)
>If you need a Linux VM, I have no idea why you wouldn't run a full-blown VM software like Fusion or VitualBox,

If anyone is confused about the benefits of WSL2 like the above statement, here's a video demonstrating the automatic integration of Linux+Windows. A deep link to get past the install & setup:

https://youtu.be/A0eqZujVfYU?t=5m46s

tldw: The difference is WSL2 is more tightly integrated with Windows.

E.g. the WSL2 "Linux" environment can automatically "see" Windows drives and likewise, Windows can see into Linux mount points. You can immediately type "ls /mnt" and see the C: drive of Windows without any setup. In contrast, with full VMware/VirtualBox, I'd have to type in something like:

  sudo mount -t cifs -o username=administrator //mywindesktop/c\$ /mnt/win-c
Of course, entering a command isn't a big deal for technical folks but with WSL2, you don't even bother with the ceremony of it. Also, network ports are automatically set up, so Windows & Linux can communicate with each other. It's lightning fast and seamless, unlike a full vm. Another UI convenience with WSL2 is normal Ctrl+V paste works unlike a Ubuntu vm where I had to mentally pause and remember to press Shift+Ctrl+V.

I stopped running a full Linux VM unless I need the extra isolation for investigating malware.

Re:WSL2 can now mount Linux ext4 disks directly by mythz on Tuesday November 09, 2021 @07:21AM (#29160728)
Windows is better as a Desktop, Linux is better as a server, WSL lets you work with both, seamlessly.

So I do most of my development on Windows, but deploy to Linux servers.

Re:WSL2 can now mount Linux ext4 disks directly by diffeomorphism on Tuesday November 09, 2021 @07:43AM (#29160965)
That does not seem to address the question. WSL2 is a VM with a custom init and graphics implementation, but still a VM. So why WSL2 and not vmware or virtualbox or ... ?
Re:WSL2 can now mount Linux ext4 disks directly by mythz on Tuesday November 09, 2021 @08:02AM (#29161156)
WSL2 works seamlessly within the same OS that transparently handles managing the VM. It's better integrated where I use shell scripts in dev projects built using Win dev tools, have both Win command-line and bash open in Windows Terminal, JetBrains IDEs or VS Code. VS Code and Jet Brains also lets you seamlessly open projects in WSL and build with Linux tools, needed for our Ruby Jekyll site.
Re:WSL2 can now mount Linux ext4 disks directly by qayxc on Tuesday November 09, 2021 @07:58AM (#29161123)
Seamless cross-system access to files and programs.

Show me a VM that allows me to access the entire host and client filesystem seamlessly without barriers.

WSL allow you to do just that and for that alone it's very useful. You can automate tasks using Windows-only software (compilers, etc.) with Linux userland tools and run both Linux and Windows software without resorting to Wine or similar translation layers that come with their own quirks and drawbacks.

Want to test whether your software package works on Linux as well? No problem, just open a terminal and compile on Linux in the same file system without having to deal with shared folders and configurations.

That's the major selling point for me.

Re:WSL2 can now mount Linux ext4 disks directly by Mashimo on Tuesday November 09, 2021 @08:02AM (#29161154)
> without having to deal with shared folders and configurations.

Does that work that easily on WSL2? I thought that was mostly a WSL1 things, and thus I have not upgraded yet.

Re:WSL2 can now mount Linux ext4 disks directly by Bayart on Tuesday November 09, 2021 @08:09AM (#29161232)
WSL2 can still communicate across file-systems, though it's not particularly advised. For that specific task WSL1 is probably faster.
Re:WSL2 can now mount Linux ext4 disks directly by nikau on Tuesday November 09, 2021 @07:38PM (#29169596)
Its fine for most day to day tasks, for example I have a simple "~/d" symlink to my windows "Downloads" folder that I can use to fetch files I've downloaded in windows Chrome.
Re:WSL2 can now mount Linux ext4 disks directly by Bayart on Wednesday November 10, 2021 @08:38AM (#29174470)
It's serviceable for one-offs, but you can't do any really high throughput stuff with that since it's going through a network protocol. For example you really need to keep your git repos on the WSL fs, rather than in the Windows tree. The upside is that they thought about it and Visual Code integration is seamless.
Re:WSL2 can now mount Linux ext4 disks directly by nikau on Thursday November 11, 2021 @02:25AM (#29185364)
Luckily most of my is pretty segregated - either its all on Linux or all on Windows.
Re:WSL2 can now mount Linux ext4 disks directly by nikau on Tuesday November 09, 2021 @07:35PM (#29169564)
One killer feature is WSL2 can run windows binaries.

I've made an "open" alias to emulate the mac behavour, eg. you run "open fred.docx" inside WSL2 and it will open the document in word.

I've also made a "pbcopy" clone, and have a bunch of other scripts that simplify mundane tasks.

Re:WSL2 can now mount Linux ext4 disks directly by dboreham on Tuesday November 09, 2021 @08:27AM (#29161408)
It's the same thing but : cheaper, faster, easier.
Re:WSL2 can now mount Linux ext4 disks directly by cies on Tuesday November 09, 2021 @07:45AM (#29160988)
> Windows is better as a Desktop

Warning opinion ahead... W98SE was better as a desktop back then. Nowadays, I prefer Linux any day. Reinstalling a Windows machine is a total nightmare, reinstalling a Linux takes me 1.5h at most.

Re:WSL2 can now mount Linux ext4 disks directly by Mashimo on Tuesday November 09, 2021 @08:08AM (#29161216)
When it comes to things like HDR, floating point scaling, hardware accelerated browser, DRM (netflix etc) it seems linux on the Desktop still "not there" At least what I gather from user reports on /r/linux

Of course if you don't use any of these features it's not that big of a deal.

I'm happy with my windows 7 that got upgraded to win 8 that got upgraded to win 10 + wsl1. ~5 year old installation by now.

Re:WSL2 can now mount Linux ext4 disks directly by throwawaycuriou on Tuesday November 09, 2021 @08:24AM (#29161381)
I don't have an HDR display, but the rest of the items you list are 'there' at least on Wayland.
Re:WSL2 can now mount Linux ext4 disks directly by formerly_proven on Tuesday November 09, 2021 @08:32AM (#29161462)
Except DRM where Amazon, Netflix et al. just decide that Linux doesn't get HD streaming, but Windows does (one might claim that Linux is maybe better to circumvent DRM since it's the hacker OS, but there is no material difference between a non-secure-boot non-TPM Windows and Linux here; both allow the user to run kernel code and permit effectively full control of the machine).
Re:WSL2 can now mount Linux ext4 disks directly by Mashimo on Tuesday November 09, 2021 @08:57AM (#29161766)
Just a few days I have been told:

> To achieve an effective resolution of 1920x1080 you're looking at a scaling factor of 1.5, and it just doesn't work well. It also increases battery drain on a system that already has battery life issues.

But I don't know the details. hardware acceleration in browser I think is somewhat new? Last half year or so, is it now by default? You only have stereo and max HD on linux with most streaming providers. No surroundsound.

Re:WSL2 can now mount Linux ext4 disks directly by Isthatablackgsd on Tuesday November 09, 2021 @09:22AM (#29162085)
> W98SE was better as a desktop back then.

Other than nonexistent USB drive support, it is a great desktop back then. I have many fond memories tinkering with Win98SE. I upgraded to WinME (stupid stupid move...) then went back to 98SE, then upgraded to WinXP pre-SP1 and hated it. So I went back to 98SE and remained in 98SE until WinXP SP2 came out. I felt 98SE was the last version (Perhaps 2000, again I only used it in high school) that caters on the interactivity between the people and the computer.

Now... it is like "screw you, we decide what is BEST for you and you have to suck it up". I do miss using 98SE and looking back of how it is a security nightmare because I deleted like drwatson.exe and few system files to get more space back for my Diablo II. You can imagine my reaction when it failed to boot up Windows next time. Ahh so much memories.

Re:WSL2 can now mount Linux ext4 disks directly by cies on Tuesday November 09, 2021 @11:18AM (#29163708)
I just meant the desktop. It was consistent, free from spy-ware, not too bloated, responsive.
Re:WSL2 can now mount Linux ext4 disks directly by amq on Tuesday November 09, 2021 @07:51AM (#29161054)
I have the opposite experience, but maybe it's just because you and me know the quirks of each system.
Re:WSL2 can now mount Linux ext4 disks directly by fleaaa on Tuesday November 09, 2021 @08:06AM (#29161201)
I like working with linux but linux as a desktop is still a nightmare outside of dev environment bubble.
Re:WSL2 can now mount Linux ext4 disks directly by dolmen on Tuesday November 09, 2021 @09:03AM (#29161831)
Linux isn't a desktop, it's a kernel.
Re:WSL2 can now mount Linux ext4 disks directly by cies on Tuesday November 09, 2021 @02:43PM (#29166466)
Windows is a package that also contains a desktop, and a kernel (since W'95 at least), and a whole bunch of other stuff.

Think you got what my colloquial ass I meant.

Re:WSL2 can now mount Linux ext4 disks directly by woile on Tuesday November 09, 2021 @07:32AM (#29160846)
Windows is "better" at enterprise, big companies give windows machines to thousands of employees. Big contracts, vpns, proxies, active record, etc. Microsoft sells a "working-integrated" (or maybe easy to setup) solution. Developers work best under Unix envs, most tooling is built around unix. Thus, having a usable dev environment on windows becomes easier with WSL2. That's where I think WSL2 fits well.
Re:WSL2 can now mount Linux ext4 disks directly by TheRealDunkirk on Tuesday November 09, 2021 @07:38AM (#29160917)
My corporate desktop is behind. We're running a build of Windows 10 that doesn't even support WSL2. We're going to have to wait until next year's hardware refresh to get Windows 11, but I don't know if they'll allow us to enable it. All it would take is for one person to point out how it's basically another machine running on the same hardware, and my IT department would probably freak out and demand that we install all the anti-virus and "endpoint protection" software on it.
Re:WSL2 can now mount Linux ext4 disks directly by jve on Tuesday November 09, 2021 @07:44AM (#29160984)
Windows Defender for me was late to the party when scanning source code... it detected it but little bit too late. If your IT dep ever freaks out, tell that someone on the internet was actually protected within WSL + Docker: https://news.ycombinator.com/item?id=29159990#29160902
Re:WSL2 can now mount Linux ext4 disks directly by dboreham on Tuesday November 09, 2021 @08:21AM (#29161351)
I've always used Windows to develop Linux (previously Unix) server applications. Have done since 1996. Originally I used Windows because it was the only way to have a laptop. I like to code on airplanes and so on. Subsequently, I never saw a reason to change -- Macbooks are much more costly than Windows and "weird" if you're used to Windows. The flavor of Unix supported in macos is not the same as Linux. Linux on the laptop was never a serious solution because none of the Windows apps that I use would work. Also historically many hardware features (power management, WiFi, ...) didn't work well.

I began this journey before VMs on the desktop existed, and although I have used VMWare and VirtualBox, I found them cumbersome vs my preferred approach which was to make the Windows shell work like Unix (then Linux). For most of history I used Cygwin for this. You click a button and get a shell where you can run your build, utility commands etc, and you can use Windows native IDE such as IntelliJ.

I'm now a heavy WSL2 user. For me it is : Cygwin that works perfectly (since it's running a real Linux kernel and distro).

Yes, underneath it's a VM but the implementation is extremely fast and well integrated. I still get to click a button and have a shell I can run my build in. Filesystem access in both directions works. Docker even works. I no longer need to worry that yarn behaves oddly when running on Windows.

I don't (for this purpose) want "total control", I just want it to work out of the box. I also want it to keep working when my NT kernel updates, which can't always be said for VirtualBox and kin.

Re:WSL2 can now mount Linux ext4 disks directly by supernovae on Tuesday November 09, 2021 @08:57AM (#29161770)
The simple answer, is you just have to try it.

It's not a use case. It's linux. Fusion and Virtualbox are terrible in comparison. With WSL2(g) you get GPU acceleration, audio, X apps and whatever distro you want (and running them in parallel if you so wish). VS Code in WSL with Docker is great - much better experience than MacOS if you ask me - especially with an architecture change.

Re:WSL2 can now mount Linux ext4 disks directly by perryizgr8 on Tuesday November 09, 2021 @07:22AM (#29160739)
I also thought what you have described. However I have noticed that there are some advantages to WSL2. The biggest is that VS Code is so tightly integrated. It is truly plug and play. With virtual machines I had to constantly keep fiddling with ports and network interfaces and IP addresses. It really "just works" when you use VS Code with WSL2. Another is that Windows is smart about starting and stopping the Linux VM. I don't have to manage it. It starts up when you open a terminal or open your project in VS Code. It shuts down after some time if you don't use it. No memory usage, no CPU usage.
Re:WSL2 can now mount Linux ext4 disks directly by TheRealDunkirk on Tuesday November 09, 2021 @07:32AM (#29160852)
That's interesting. I've never tried it, but having it "just work" would indeed be nice, IF it always did the right thing. The first time it made a bad assumption that I had to tweak a config file to fix, I'd be running back to a "real" VM host. Have you ever had to do modify how it runs? (Maybe that's not even possible.)
Re:WSL2 can now mount Linux ext4 disks directly by perryizgr8 on Tuesday November 09, 2021 @07:37AM (#29160897)
> Have you ever had to do modify how it runs?

No I haven't modified its behavior beyond a few of the common preferences in the settings page.

Re:WSL2 can now mount Linux ext4 disks directly by dom96 on Tuesday November 09, 2021 @09:02AM (#29161824)
I'm also not sure why I'd use WSL2 and there are at least three big problems I ran into with it straight after upgrading:

* It broke my ability to flash my ESP32 via USB (guessing WSL2 has trouble accessing USB devices)

* It uses significantly more RAM than WSL1

* There is performance problems when working on NTFS partitions, or at least there were when I tried it: https://github.com/microsoft/WSL/issues/4401

Re:WSL2 can now mount Linux ext4 disks directly by jve on Tuesday November 09, 2021 @07:37AM (#29160902)
Corporately managed desktops/notebooks within Active directory with various security and automation settings applied. (If that sounds scary, to you, well... I have actually better piece of mind for my work laptop than home. As a bonus, I get to know the applied configurations as I was one of responsible to implement them). Yet, powering up wsl to start node application and fiddle around if necessary. To me it sounds great.

Ofcourse, node can be configured on windows too. But then you need different docker commands/builds and docker desktop now is not free for everyone, etc.

By the way, playing around with docker build for npm app within WSL, I happened to npm install the vulnerable ua-parser-js version. Security gave me a call and we were relieved that it was within windows-wsl-docker instance. So after validation, no compromise within upper layers. This was actually an eye-opener for me that, given the threats of npm and stuff, gave some serious bonus points for jumping into docker-fan-bandwagon.

Running VM takes more hassle (but is ofcourse an option). Setting up WSL and playing around was very easy. And you don't have to think about forwarded ports and mapping file system. And running "code ." within WSL felt good - vscode poped up locally but terminal/code is actually on WSL. And you get to browse your localhost on Windows that is actually on linux. Doable on VM, but then one needs to know how to configure ssh, passwordless auth.

If you are Linux-first user, yeah, maybe you don't see value. But think about it - this is also introducing windows folks to Linux!

Re:WSL2 can now mount Linux ext4 disks directly by dTal on Tuesday November 09, 2021 @08:28AM (#29161413)
>this is also introducing windows folks to Linux!

I highly doubt that. Nobody is playing around with WSL for fun, and it's more annoying to get into than just writing a USB and booting Linux directly. No, what WSL accomplishes is pulling people who need Linux due to its technical superiority away from Linux-proper. It's embrace-and-extend.

Re:WSL2 can now mount Linux ext4 disks directly by createmyaccount on Tuesday November 09, 2021 @07:28AM (#29160811)
Linux is a nicer development environment, Windows is a nicer desktop environment. I use WSL2 full time for development (python/django, ruby/rails) and it's almost as nice as being on OSX. Almost.
Re:WSL2 can now mount Linux ext4 disks directly by smallerfish on Tuesday November 09, 2021 @07:37AM (#29160903)
You say that, but what you do like about the desktop environment on Windows more? Of course we don't need a battle of desktops, just curious about what you've tried and didn't like on the Linux side. (I abandoned Windows in 2000, and have hated the limitations Windows desktop I've tried since, up through Windows 10.)
Re:WSL2 can now mount Linux ext4 disks directly by nikau on Tuesday November 09, 2021 @07:40PM (#29169609)
I prefer WSL2 over OSX, just from the fact that apt is so much quicker and reliable than brew.
Re:WSL2 can now mount Linux ext4 disks directly by rafaelvasco on Tuesday November 09, 2021 @07:52AM (#29161072)
I use WSL2 daily for work. It's much better then using a fullblown VM, because it's much much faster to open and is completely integrated into Windows, and works seamlessly with Docker for Windows, which is now an order of magnitude faster compared to before. Soon, using VM applications like VirtualBox will make no sense at all for most use cases.
Re:WSL2 can now mount Linux ext4 disks directly by eecc on Tuesday November 09, 2021 @08:19AM (#29161329)
well... completely integrated is a stretch.

I'm currently wrestling with Ubuntu because IntelliJ will crash hard when opening a Java project on a WSL path.

When it doesn't crash (downgrade the jbr) it will fail to establish the RMI connection with the mvn process in Linux.

In a previous Scala project I also had to go Ubuntu native because the IntelliJ sbt plugin would run the Win10 jvm even when running in the WSL2 context.

So, yeah... there's enough differences to make it unusable for me.

Re:WSL2 can now mount Linux ext4 disks directly by madeofpalk on Tuesday November 09, 2021 @08:45AM (#29161617)
Seems like you would have these exact same problems if you were running Ubuntu in a VirtualBox VM also?
Re:WSL2 can now mount Linux ext4 disks directly by eecc on Tuesday November 09, 2021 @05:17PM (#29168260)
Nah, I wouldn’t have tried to run IntelliJ from windows at all, or I’d have run Mingw or just booted to Linux.

Or just gone MacOS as I’ve done for 15 years. I tried out windows out of exasperation for Apple’s latest intel lemons and out of curiosity, wondering if the grass has finally grown on the other side of the wall. Nope, still the same

Re:WSL2 can now mount Linux ext4 disks directly by ABeeSea on Tuesday November 09, 2021 @07:41AM (#29160942)
Virtual box is incredibly slow and graphically buggy on even a beefy windows machine. I was very happy when I moved to wsl2 from an Ubuntu VM run through a virtual box window.
Re:WSL2 can now mount Linux ext4 disks directly by signal11 on Tuesday November 09, 2021 @08:28AM (#29161422)
> Who here is writing software which runs on Linux, yet needs to be running Windows while they do it?

Lots of developers: NodeJS, Ruby, Python, Data Science folk... They typically deploy on Linux in production so often want Macs to get a POSIX-ish environment on their development environment (sadly, too few developers run Linux on their laptops).

Yes, VirtualBox is helpful. Many people use automation on top of it, too e.g. vagrant. But WSL2 arguably improves the dev experience by making it a standard, "out of the box" affair.

I see WSL2 as a way for Windows to compete better against Macs. It definitely isn't going to convince Linux fans to switch. But they can ask you to consider: you can now get a newer `bash' out of the box with Windows than macOS. Which OS works better for POSIX-stack development?

Re:WSL2 can now mount Linux ext4 disks directly by Steltek on Tuesday November 09, 2021 @08:53AM (#29161701)
I don't know if it's too late for that group. Macs are fashionable and I think people will feel they're being treated poorly if given a Windows laptop instead.

You're right on with WSL2 providing a standard usable environment though. Windows and Mac developers both need a ton of handholding to get started and WSL2 makes it a lot easier to hand them a wiki page and expect fewer 1:1 calls to tweak setups.

Re:WSL2 can now mount Linux ext4 disks directly by trelane on Tuesday November 09, 2021 @08:55AM (#29161742)
> Which OS works better for POSIX-stack development?

Linux. The one you're _actually_ using. Skip the proprietary ad company desktop and use what you're wanting to.

Re:WSL2 can now mount Linux ext4 disks directly by lghh on Tuesday November 09, 2021 @08:49AM (#29161650)
I don't want a full VM with a full desktop experience with all my development related applications to be a separate experience from the rest of my non-development computer use cases. I like that I can very quickly open a single terminal, open my local install of VSCode that I do some non-Linux specific development in as well, open my normal day-to-day browser to look at docs, etc and just have it. It's the same computer and the same environment that I do everything in. I don't need two sets of keybindings, two sets of applications, two terminal configs, a whole new desktop env etc just to write some non-Windows software. It's just VSCode using my exact same config and keybindings, my normal browser, and my same terminal emulator.
Re:WSL2 can now mount Linux ext4 disks directly by invokestatic on Tuesday November 09, 2021 @07:30AM (#29160832)
I am often happy to give up full control in exchange for convenience. WSL2 works fantastic for very quickly getting a Linux box up and is pre-configured for interoperability with Windows. Sometimes I don’t want to mess around getting these types of tools up myself.
Re:WSL2 can now mount Linux ext4 disks directly by nickjj on Tuesday November 09, 2021 @07:59AM (#29161126)
> I just can't understand why anyone cares about WSL2

It works seamlessly with Docker Desktop, the MS terminal has built in support to switch between WSL 2 distros and you don't need to set up an X server to run what feels like a native Linux terminal emulator from Windows like you would if you manually ran a VM.

All of these are advantages over rolling your own VM. Around 6-8 years ago I used to run a self managed Linux VM on Windows with VMware Player and Unity mode. Current day WSL 2 is better in pretty much every way for general purpose web development and wanting to use the command line from Linux.

Re:WSL2 can now mount Linux ext4 disks directly by rbanffy on Tuesday November 09, 2021 @08:33AM (#29161472)
I believe the question is who actually needs a Windows machine. Office also runs on Macs and, unless you need to do some fancy spreadsheeting, LibreOffice is there for you. If not, the web-based Office or their Google counterparts can do a lot through the browser. WSL is still much slower than a native install of Linux on the same hardware.
Re:WSL2 can now mount Linux ext4 disks directly by vips7L on Tuesday November 09, 2021 @08:55AM (#29161731)
I prefer to work on windows. My hardware just works, all of the programs I need just work, and it has better integration with the shell I prefer (powershell). The only time I ever need Linux/Unix is when some Unix dev decides to not use cross platform tools in their project (e.g. posix shell).
Re:WSL2 can now mount Linux ext4 disks directly by rbanffy on Tuesday November 09, 2021 @09:24AM (#29162108)
While I have been cautious, avoiding bleeding-edge CPUs and dGPUs (and Nvidia), I haven't had a computer that didn't work with Linux in at least 15 years. I am always curious what hardware doesn't work that is essential enough to use Windows.
Re:WSL2 can now mount Linux ext4 disks directly by __s on Tuesday November 09, 2021 @09:43AM (#29162366)
I am. Work laptop is Windows, but I'm writing code that runs on Linux VMs. The software cycle is the same as using Linux (but granted, I've always kept my development process in terminals)

I started out in a virtual machine before wsl2. I want a terminal that interacts with the Windows environment (easy copy paste, mouse support in terminal, no lag of running graphical environment in terminal), so I was sshing into my virtual machine. wsl2 skips that step. I was sshing into wsl until Windows Terminal since before that I was using some Chrome SSH app which had mouse support

Re:WSL2 can now mount Linux ext4 disks directly by coliveira on Tuesday November 09, 2021 @08:07AM (#29161212)
This is MS trying to bring back developers to their closed platform. I wouldn't touch this with a 10m pole.
Re:WSL2 can now mount Linux ext4 disks directly by npteljes on Tuesday November 09, 2021 @09:04AM (#29161845)
It's so that the next generation of developers don't need to learn Virtualbox or any other virtualization stuff. I think the power tools are not en vogue in general. I have seen many of my software engineer colleagues doing their work with basic tools like Notepad and Windows Explorer.

So answer your question: this is one Microsoft's newer efforts to lock people into Windows. This is one of the ways which are not locking people in by force; this one works by inducing complacency.

Re:WSL2 can now mount Linux ext4 disks directly by guhidalg on Tuesday November 09, 2021 @09:11AM (#29161936)
Or, hot take here, they just want you to be more productive on Windows so you continue buying Windows. Surprise! That's how innovation works! You keep using the product if it's easier than the alternative.
Re:WSL2 can now mount Linux ext4 disks directly by npteljes on Tuesday November 09, 2021 @09:54AM (#29162517)
There's an even better thing, for them, which is when people don't have a real alternative.
Re:WSL2 can now mount Linux ext4 disks directly by misja111 on Tuesday November 09, 2021 @08:59AM (#29161787)
> Who here is writing software which runs on Linux, yet needs to be running Windows while they do it?

There are plenty of companies that are locked in to Windows for their workstations but have servers running on Linux. Many financial companies for instance. As a developer you have the choice of developing in Windows, in a VM or in WSL2. I personally find WSL2 the lesser evil of the three.

Re:WSL2 can now mount Linux ext4 disks directly by DRW_ on Tuesday November 09, 2021 @07:31AM (#29160840)
As others have mentioned, the preference for the Windows desktop environment, but also Microsoft are putting work into development tools that integrate into WSL quite well.

For example, VSCode integrates fairly seamlessly into WSL, so your app can be running in WSL but your editor in native Windows and they manage all the complexity of the host -> vm communication for you.

Re:WSL2 can now mount Linux ext4 disks directly by shirleyquirk on Tuesday November 09, 2021 @07:43AM (#29160971)
In a word, embedded. All our user facing software and development tools are Windows, all the code I actually write runs on Linux.
Re:WSL2 can now mount Linux ext4 disks directly by eledra on Tuesday November 09, 2021 @07:23AM (#29160752)
I often use WSL2 for my work on my Windows laptop. It supports Kubernetes, Docker that you installed on the Windows machine. You can also easily throw files, deploy web services, servers on WSL and access it from windows browsers. I can use my MS Office at the same time without any problem. It is much better than using Ubuntu in my opinion
Re:WSL2 can now mount Linux ext4 disks directly by TheRealDunkirk on Tuesday November 09, 2021 @07:30AM (#29160825)
I hear you saying that you like to be able to run native Outlook and Teams while you work on things that need to deploy to Linux. Am I reading that right?
Re:WSL2 can now mount Linux ext4 disks directly by ramblerman on Tuesday November 09, 2021 @07:51AM (#29161059)
My use case is simpler.

Finally a proper terminal in windows that makes it a worthy dev environment.

wsl2 with docker surpasses the osx experience now as well.

Re:WSL2 can now mount Linux ext4 disks directly by phendrenad2 on Friday November 12, 2021 @03:56AM (#29197437)
Because a VM requires you to manage a window for the VM itself. WSL is more seamless. Speaking of seamless, VirtualBox has a "seamless mode", where guest OS apps can appear as normal host OS windows. However, if you're running a "full Linux distro" inside your VM, this isn't very useful, because you'll have this ugly and tricky-to-manage Linux GUI widget also (the dock on GNOME, or the taskbar on KDE). WSL also lets you launch Linux apps from the Windows start menu, which you can absolutely achieve with VirtualBox, but it'll be a manual effort of writing BATCH files.
Re:WSL2 can now mount Linux ext4 disks directly by stonemetal12 on Tuesday November 09, 2021 @09:27AM (#29162156)
What you see as an up side "total control" I see as a downside "Required Control". Why do I need to specify how many VCPUs it gets and exactly how much ram it gets? I don't really care, I just want a little Linux environment to fool around with.
Re:WSL2 can now mount Linux ext4 disks directly by porker on Tuesday November 09, 2021 @08:46AM (#29161629)
And what do people do for versioning software on WSL2? My benefit with full-blown VMs is that when piece of software I'm writing needs specific packages, I can set them up and not affect anything else.

This goes beyond venv, virtualenv, nvm to having multiple database point releases installed, or underlying graphics processing libraries.

I like the speed and seamlessness of WSL2 but my nightmare on Windows and OSX has been the mismatch of versions which when you've 20+ projects over a few years starts to make keeping them all in running states a nightmare.

Is the WSL2 answer to VMs to use WSL2+Docker?

Re:WSL2 can now mount Linux ext4 disks directly by rocqua on Tuesday November 09, 2021 @08:58AM (#29161779)
Yeah docker for repeatability. Has the advantage of making it much more reproducible for others. A dockerfile and docker-compose.yml are much easier to check into git than a full VM image.
Re:WSL2 can now mount Linux ext4 disks directly by TheGuyWhoCodes on Tuesday November 09, 2021 @09:03AM (#29161834)
yes, WSL2+Docker works well enough and a lot of tools have wsl and Docker integration so it's easy.

If you already use docker containers it's a win win.

Re:WSL2 can now mount Linux ext4 disks directly by madeofpalk on Tuesday November 09, 2021 @08:38AM (#29161544)
I don't use WSL because it's linux, I use it just because it's a better prompt/shell environment for Windows.

I have a decent Windows for gaming (and to do the occasional actual Windows app development, but very rarely), so I use that for my work now (web development). The tooling is just better within WSL than natively in Windows.

I'm not sure about the actual overhead of WSL vs a full VM, but I've never experienced any problems with WSL and it's pretty seamless. A full blown VM running in VirtualBox just feels like a lot more overhead.

Re:WSL2 can now mount Linux ext4 disks directly by avsteele on Tuesday November 09, 2021 @08:21AM (#29161357)
Reasons I installed:

* I wanted to work at the Linux command line without exiting windows/rebooting

* I didn't know anything about VMs. What options are available, cost, how to set them up etc..

* zero-knowledge to installation took 5 minutes.

Re:WSL2 can now mount Linux ext4 disks directly by bluedays on Tuesday November 09, 2021 @07:37AM (#29160901)
Because for some reason people think Windows is a good desktop experience.
Re:WSL2 can now mount Linux ext4 disks directly by vp8989 on Tuesday November 09, 2021 @08:03AM (#29161166)
"Who here is writing software which runs on Linux, yet needs to be running Windows while they do it?"

Backend developers at .NET shops who were issued Windows laptops by their companies.

Re:WSL2 can now mount Linux ext4 disks directly by exnihilo21 on Tuesday November 09, 2021 @07:41AM (#29160948)
If your desktop environment is Windows, but an open source project you want to contribute to supports Linux more naturally, but Windows is more tricky to get up and running. It is easier with the support VS code has for the integration with WSL2. I can develop in a Windows environment, but run tests and build on Linux.
Re:WSL2 can now mount Linux ext4 disks directly by cjvirtucio on Tuesday November 09, 2021 @08:00AM (#29161140)
Some companies only support OSX or Windows workstations, in which case WSL helps (for the latter scenario).
Re:WSL2 can now mount Linux ext4 disks directly by hk1337 on Tuesday November 09, 2021 @08:55AM (#29161728)
For the most part I am with you, I would prefer either Linux or macOS if I want that sort of environment but I recently setup windows 10 with docker and wsl2 and it has come quite a long way since I first tried it. Like, I could actually see myself working in that environment.
Re:WSL2 can now mount Linux ext4 disks directly by girvo on Tuesday November 09, 2021 @08:33AM (#29161477)
For me it’s just a useful underlay for Docker development containers with VSCode.

Previously I was using Multipass with Ubuntu (on Hyper-V) but that had some weird issues annoyingly, that WSL2 just doesn’t. It’s basically seamless for me at this point.

But my use case is narrow as heck.

Re:WSL2 can now mount Linux ext4 disks directly by heresie-dabord on Tuesday November 09, 2021 @08:04AM (#29161183)
Linux affords the GNU userland: unencumbered and well-tested FOSS tooling. I use WSL the way I use Cygwin.

But if I had to choose between the too, I would favour the longevity of Cygwin.

Re:WSL2 can now mount Linux ext4 disks directly by kuroguro on Tuesday November 09, 2021 @08:22AM (#29161362)
Personally I use it for the command line tools / bash scripts that I can use with files on windows drives seamlessly. It's just convenient.
Re:WSL2 can now mount Linux ext4 disks directly by jimlikeslimes on Tuesday November 09, 2021 @08:03AM (#29161171)
I use it to run Emacs with Magit quite nicely :)

    $> wsl --install -d Ubuntu-20.04
    $> wsl
    $> sudo apt upgrade
    $> sudo apt update
    $> sudo apt install emacs
    $> git clone https://github.com/.../.emacs.d.git
    $> emacs --daemon
Shortcut on desktop (with VcXsrv running):

C:\Windows\System32\wsl.exe bash -c "export DISPLAY=localhost:0.0 && export LIBGL_ALWAYS_INDIRECT=1 && export XCURSOR_SIZE=16 && setsid emacsclient -c"

Re:WSL2 can now mount Linux ext4 disks directly by hulitu on Tuesday November 09, 2021 @09:17AM (#29162017)
It makes sense for ramsonware people. With WSL they can encrypt also your linux files so they can ask for more money.
Re:WSL2 can now mount Linux ext4 disks directly by kkapelon on Wednesday November 10, 2021 @05:14AM (#29173064)
WSL:

- starts instantly

- takes as much memory as it uses

- just works

No setup, No config, no fuss. It doesn't get any easier than this.

Re:WSL2 can now mount Linux ext4 disks directly by kitkat_new on Tuesday November 09, 2021 @08:36AM (#29161512)
a linux VM is an isolated OS, WSL is fully integrated with Windows