
Windows Subsystem for Linux 2 Moving into General Availability - msolujic
https://www.infoq.com/news/2020/04/wsl-2-general-availability/
======
AaronFriel
In WSL1, running "wsl git status" on a moderately sized repo on an NTFS
(Windows side) drive or SMB file share is nearly instantaneous.

In WSL2, running the same command takes over 30 seconds. WSL2 is a _massive_
hit to the seemless experience between the two operating systems with
filesystem performance from Linux to Windows files orders of magnitude worse.
Yes, unzipping tarballs or manipulating and stat syscalls are cheaper now on
the Linux side. The downside performance loss is, however, staggering for the
files I had in C:\

Don't even get me started on how long an npm install took.

One of the truly wonderous things about WSL1 was the ability to do something
like this in a PowerShell window:

C:\some-code-dir\> wsl grep -R "something" | Some-PowerShell | ForEach-Item {
}

Now performance across the OS boundary is so bad, I wouldn't even think of
using "wsl grep" in my C drive. Or "wsl npm install" or "wsl npm run test" or
any of that.

It's very depressing because WSL1 is so, so promising and is so close to
feature parity. WSL2 should definitely stick around and has use cases, for
Docker it's unparalleled. But for daily driver mixed OS use, WSL2 has made me
very unhappy. I think I'll be deconverting my various WSL distributions
because the performance hit was too much, it just was absolutely unbearable to
even run simple commands in my Windows side.

~~~
pjc50
Clearly the best solution is for Microsoft to (a) write a proper ext4 driver
for Windows and (b) find some way of embedding SIDs into ext4, then you could
just format the drive as ext4, boot off it, and have the improved performance.

(This is mostly a joke, but the performance of NTFS for certain operations has
always been abysmal, and having a virus scanner injecting itself into all the
operations only makes it worse.)

~~~
majewsky
AFAIK the main problem is that Unix's file permissions do not cover Windows'
permission model. That would be tolerable on a data partition, but a system
partition is going to use all kinds of very particular permission setups on
system binaries etc.

You might be able to model that stuff as xattr, but then it could be
problematic to mount that ext4 partition into Linux because applications might
be copying files without respecting the xattrs.

~~~
XzAeRosho
>AFAIK the main problem is that Unix's file permissions do not cover Windows'
permission model.

Well, since Microsoft has been borrowing more and more ideas from the Linux
ecosystem, it would not surprise me that a Windows 10 successor would include
some kind of compatibility layers for different file systems.

We can dream...

~~~
shrimp_emoji
Why don't they just replace Windows with their own Linux distro? :D WSL2
cannibalizes Windows from the inside out, and all that's left is Sphere. Seems
like the most efficient solution.

------
chx
I am giving up.

WSL1 was a great invention but Microsoft gave up on it, either because of the
filesystem performance problems or because of the debuggers.
[https://github.com/microsoft/WSL/issues/2028](https://github.com/microsoft/WSL/issues/2028)
(lldb, rr, delve all affected). This looks like a dreaded case of the first
90% is easy, it's the second 90% that is hard. Imagine implementing a
translator for a vast majority of Linux syscalls just to find certain flavors
of ptrace are just not doable. I do not have insider knowledge to ascertain
this happened but this would be my educated guess.

WSL2 is a VM like any other VM with an uncertain promise for better networking
experience and even less certain promise for cross OS file performance which
is much, much worse than WSL1 which was already abominable.
[https://github.com/microsoft/WSL/issues/4197#issuecomment-60...](https://github.com/microsoft/WSL/issues/4197#issuecomment-604592340)

It was a very nice dream, pity it didn't work out.

Because I am using an eGPU Windows 10 needs to stay as the primary OS on the
laptop. I bought a little fanless machine from Aliexpress (with laptop-like
hardware) for <$300 USD it'll be my home Linux server. What can one do?

I guess
[https://www.reddit.com/r/VFIO/comments/am10z3/success_thunde...](https://www.reddit.com/r/VFIO/comments/am10z3/success_thunderbolt_egpu_passthrough_on_dell_9560/)
could be a solution if I wanted to go back to Linux primary but I really badly
don't want to. Constant hardware headaches were par for the course -- I was
solely Linux 2004-2017. I don't want to be again. If there would be a cheap
remote sysadmin service... but it doesn't exist. QuadraNet will sysop a server
for $39 a month, that'd be awesome for a laptop... but I have never seen
anyone doing that.

~~~
juped
WSL was very cool from a pure tech standpoint, but I've never been clear what
the actual use case for it was. WSL2 seems to be more along the lines of
coLinux, which I felt the same way about when it was new.

~~~
chx
Well, if you want to use multimedia and do web development on the same
machine, what are you going to do? Linux support is somewhere between
nonexistent and utterly broken for the first one and the same can be said for
the second on Windows. So your choices are, 1. run Linux primary, put Windows
in a VM 2. run Windows primary and put Linux in a VM 3. Give up and just run a
separate Linux server.

~~~
theevilsharpie
The Linux multimedia story improves significantly if you avoid Nvidia GPU
hardware. My work desktop (AMD Radeon) and laptop (Intel HD Graphics) work
fine, and perform as the hardware should.

~~~
chx
Sound and bluetooth , like , works now? That wasn't my experience back then.
Both of them were entire stacks of spaghetti.

~~~
jmiskovic
This seems like comment from early 2000s. I don't remember last time I head
problems with BT or sound, and I went through dozen of installations in last 3
years (for me and others). I had to give up on Nvidia drivers but Intel
graphics serves me great.

~~~
chx
Bluetooth broke on me:

[https://bbs.archlinux.org/viewtopic.php?id=204875](https://bbs.archlinux.org/viewtopic.php?id=204875)
2015 November

[https://bbs.archlinux.org/viewtopic.php?id=206032](https://bbs.archlinux.org/viewtopic.php?id=206032)
2015 December

[https://bbs.archlinux.org/viewtopic.php?id=210685](https://bbs.archlinux.org/viewtopic.php?id=210685)
2016 March.

And these were times when I needed community help, most of the time I could
get it working by pairing again or some such nonsense. It never worked
reliably, in general.

Note I switched to Windows as my daily driver in 2018 January.

It seems sound is still a gigantic mess of PulseAudio and ALSA
[https://wiki.archlinux.org/index.php/PulseAudio](https://wiki.archlinux.org/index.php/PulseAudio)

~~~
dman
If you things to just keep on working Arch might not be the distro for you.
Have you tried something like ubuntu?

~~~
pjmlp
Canonical broke wlan and OpenGL for many of us when they decided to replace
fully working closed source drivers, with work in progress open source
replacements.

So even Ubuntu isn't necessarily a guarantee of stability.

~~~
dman
Sigh - I hear you.

------
saagarjha
> He further mentions that unzipping tarbars could see a 20 times performance
> increase.

Boy, do I love unzipping tarbars! On a more serious note, it’s great that WSL
has gotten much faster, although it’s a little disappointing that they threw
out the older, more interesting architecture to get it and just used a VM.

~~~
jchw
I agree wholeheartedly. I know it was probably a fool’s errand especially in a
world where Docker for Windows was doing the same thing WSL2 does but worse,
but WSL1’s design just satisfied me in a way that Hyper-V will not.
Presumably, this also means you have to have Hyper-V enabled, crippling all
other VM software. Hope the integration is impressive at least, to hopefully
make up for it. I admittedly don’t run Windows these days but WSL is
definitely one of the highlights of modern Windows and it’s hard to not follow
its progress.

I also wonder how integration changes with sockets/networking, hardware
access, Windows Firewall, etc. Last I checked, relations with Windows Firewall
were strained by the lack of proper support for picoprocesses.

~~~
lmz
Stop blaming Hyper-V for "crippling other VM software". You ever tried to run
VBox and KVM together? It's a limitation of the processor's virtualization
extension.

~~~
inyorgroove
Problem is once Hyper-V is installed and enabled, no other VM can even be
started regardless of no Hyper-V VMs actually running. This limitation does
not exist on linux afaik. I have run libvirt based VMs and VirtualBox VMs at
the same time on linux just fine in the past.

~~~
lukevp
That’s not what’s happening. Hyper-v is a type-1 hypervisor. When it’s
running, even your Windows instance is running within hyper-v. Windows 10 has
the hypervisor platform that lets other vm developers hook into the hyper-v
host architecture, that’s how you can get android emulators and virtualbox
running under hyper-v. It all works fine but is a little unintuitive to set
up.

~~~
HelloNurse
If both VirtualBox and VMware give up on Hyper-V coexistence, it must be a bit
worse than "unintuitive".

~~~
garethrowlands
They haven't given up.

------
molticrystal
VMWare [0] will also support the Hypervisor Platform Api [1] allowing it to
run besides WSL2 which uses Hyper-V. VirtualBox is still struggling and runs
slow if at all with WSL2 and Hyper-V [2]

This of course has implications on how you setup Docker on a Windows machine,
each way having pros and cons.

[0] [https://blogs.vmware.com/workstation/2020/01/vmware-
workstat...](https://blogs.vmware.com/workstation/2020/01/vmware-workstation-
tech-preview-20h1.html)

[1] [https://docs.microsoft.com/en-
us/virtualization/api/hypervis...](https://docs.microsoft.com/en-
us/virtualization/api/hypervisor-platform/hypervisor-platform)

[2]
[https://forums.virtualbox.org/viewtopic.php?p=473538](https://forums.virtualbox.org/viewtopic.php?p=473538)

~~~
souprock
This is a worrisome development. We seem to be heading toward a future where
hypervisor drivers can only be provided by Microsoft, and you're out of luck
if they don't do the job.

Hypervisors that need more capability are going to have to do some crazy stuff
to stay compatible. One option is to save and restore the whole hypervisor
state whenever it runs. Another option is to be some sort of boot loader,
seizing the hypervisor capability before Windows can get to it.

That'll be some tough code to debug.

~~~
zamadatix
Type 2 hypervisors are going to be in an interesting state. The Windows
bootloader already has a flag you can easily toggle (without removing the
Hyper-V role or config) but the problem is more features are starting to
depend on Hyper-V being there one layer up (it's a type 1 hypervisor). I'm
surprised nested virtualization can't be used for the type 2 hypervisor since
Hyper-V picked this feature up a few years back and it seems like that would
have solved all of the problems.

~~~
souprock
Nested virtualization only works when the outer hypervisor supports all the
features that the inner hypervisor needs. If the outer hypervisor is Hyper-V,
then that limits the inner hypervisor to the features that Hyper-V bothered to
implement.

In other words, you can't implement a hypervisor more advanced than Hyper-V.

If you instead want to be on the outside, with Hyper-V on the inside, then you
can't just write a driver. You have to implement a boot loader. You also have
to implement nested virtualization, even if you otherwise had no need to do
so.

~~~
zamadatix
Hyper-V is able to nest ESXi and KVM (and Hyper-V of course) and vice versa
ESXi and KVM are able to nest Hyper-V. I'm not sure what would be limited.

Yeah that's the difference between a type 1 and type 2 hypervisor. A type 1
runs on the bare metal, a type 2 runs via drivers underneath an existing OS.
Since Hyper-V is a type 1 (like ESXi) you can't use a type 2 hypervisor on the
root VM to escape being under Hyper-V you either have to do some sort of
nesting or disable Hyper-V from loading and reboot.

~~~
souprock
Heh, it's funny that I'm actually a hypervisor developer and I don't use that
terminology. The whole team doesn't. I actually had to look up "type 1" and
"type 2" to remind myself which was which. Those are terribly non-descriptive.
Our terminology is "bare metal" or "OS" or "boot loader", and "VMX driver".
Anyway...

Our hypervisor is far more demanding than ESXi, KVM, and Hyper-V. It needs to
interact with low-level Intel processor details in a way that is not supported
by any other hypervisor. It won't run correctly if nested inside any other
hypervisor. If we supported running under another hypervisor, we would lose
important functionality.

If it becomes impossible or impractical to disable Hyper-V, we'll need to do
something strange and annoying. Perhaps we could load the driver very early in
boot, before Hyper-V loads. Booting as an OS ("type 1", ugh) is an option too,
but maintaining that and using it is a real pain. Probably we'd drop Windows
host support before we did that.

------
ahupp
I switched to WSL2 a month ago and it's been great. With WSL1 I'd regularly
run into subtle compatibility problems but haven't seen anything like that
with 2. Despite a handful of annoyances, the Win10+WSL2+Visual Studio Code Dev
environment has been a lot more pleasant than OSX.

~~~
nilkn
I never thought I’d say it but because of this exact setup with VS Code I’ve
actually stopped using my MBP at home in favor of my desktop, which was really
only built with gaming in mind. I’ve now gotten used to having all the extra
computing power at hand and would struggle to go back to a laptop as my
primary development machine.

~~~
lostmsu
But why could not you do the same before? Even before WSL there was MSYS,
which IMO is great, unless you need to compile a C program, that directly uses
Linux headers.

~~~
nilkn
It’s possible I could have and I just wasn’t sufficiently in the know about
which tools to use. I hadn’t used MSYS. I’ve taken my current workflow so far
as to even use nix as my primary package manager. Would this have been easily
possible before? I ask in earnest. My setup right now is such that even mildly
arcane things like that just seem to work for the most part.

~~~
lostmsu
Turns out "nix" is hard to search due to engines matching "*nix" to it.

Nix is probably not supported on MSYS, but YMMW. I'd love to have something
like it on Windows.

------
derekp7
Question -- from what I understand, WSL2 is closer to Linux running in a VM,
whereas WSL1 was like a Windows kernel level version of Cygwin. Is that mostly
correct?

Regarding that, remember a number of years ago, prior to VMs there was a patch
set for the Linux kernel porting it to user space -- so you could run Linux as
a user process, which ended up functioning similar to running it in a VM.
Would WSL2 be closer to this model, or is it really running Linux under a
stripped down Hyper V?

~~~
yjftsjthsd-h
> Question -- from what I understand, WSL2 is closer to Linux running in a VM,
> whereas WSL1 was like a Windows kernel level version of Cygwin. Is that
> mostly correct?

Yes, that's essentially correct. You could also think of it as WINE in
reverse; one big difference from cygwin is that it runs unmodified binaries
rather than needing to recompile.

> prior to VMs there was a patch set for the Linux kernel porting it to user
> space -- so you could run Linux as a user process

User Mode Linux (UML; [https://en.wikipedia.org/wiki/User-
mode_Linux](https://en.wikipedia.org/wiki/User-mode_Linux)), which I _think_
is still a thing, although not super popular.

> Would WSL2 be closer to this model, or is it really running Linux under a
> stripped down Hyper V?

Not even stripped down; it's running Hyper V. (This is one of the big problems
with WSL2; if you use it, you can't use non-HyperV virtualization.)

~~~
cpach
Did WSL1 not use the same binaries as a regular distro? IIRC it will download
regular x86-64 .deb packages straight from e.g. Ubuntu’s APT repositories.

~~~
ehsankia
I think you read it backwards. It's cygwin that doesn't. WSL1 did.

~~~
cpach
Ah. My bad :) Should’ve known better than to comment here before I had my
coffee.

~~~
ehsankia
Hah, no worries, it took me 2-3 reads to parse that correctly too.

------
veesahni
On a Win10 host, I want to edit code in sublime and have the runtime
environment in linux. I want fast code search and fast build times.

I've found no way to accomplish the above.

Code in Windows + Windows Sublime means build in WSL will be slow because
cross-os i/o

Code in Linux + Windows Sublime means code search will be slow because cross-
os i/o

Code in Linux + Linux Sublime + Winodws Xserver means interface is laggy
because, well, Xserver

VSCode gets around this by running in a client/server model with client on
Windows and Server in Linux... but then I'm stuck with an Electron based
editor instead of Sublime.

~~~
_bxg1
What Electron-related problems have you had with VSCode? I've been using it as
my primary for a few years now and it's been nothing but stellar. And that
integration sounds incredibly cool.

~~~
mcovalt
Font rendering is a bit blurry.

~~~
_bxg1
I haven't experienced this, but I mostly use it on a Mac. What OS are you on?

~~~
iknowstuff
Technically, on Macs, all font rendering is blurry. :)
[https://pandasauce.org/post/linux-fonts/](https://pandasauce.org/post/linux-
fonts/)

~~~
tsar9x
Technically, there should be more HiDPI monitors on the market. I'm using now
24" monitor with 4k resolution, scaled 200%, and fonts are perfect :)

------
rkagerer
Am I the only one who thinks this was named backwards? Like, it should been:
_Linux Subsystem for Windows_ , or maybe _Windows ' Subsystem for Linux_

~~~
aspaceman
Totally agree. Feels like a “windows has to be first” type of thing.

~~~
simplicio
There was a MS employee on twitter the other day (sorry, I forgot who) saying
it was because there were legal issues with naming something with a title that
has someone else's trademark as the first word.

~~~
mcny
That completely makes sense in my mind just because my favorite reddit app is
called slide for reddit. I think reddit forced everyone to use x for Reddit in
their name as opposed to Reddit X.

~~~
Talanes
Reddit did exactly that, like five or six years ago. A bunch of apps had to
change their names, which is how you end up with apps like "rif is fun for
Reddit," where the first part stands for "Reddit is Fun."

------
kesor
For those of you who will be running Docker Desktop on WSL2 - which allows to
"transparently" use the "docker" command on your other Linux that runs in
WSL2. And allows to use your WSL2 "other Linux" filesystem to share volumes
with Docker containers! ..

Anyway, you need to know that when this stupid Docker and/or WSL2 VM is taking
up all your Windows 10 memory - not all is lost.

Using these two commands, you can force WSL2 to give back the memory it is
holding prisoner!

    
    
        echo 1 | sudo tee /proc/sys/vm/drop_caches
        echo 1 | sudo tee /proc/sys/vm/compact_memory
    

Especially if the one doing the mess is the "VM" of Docker.

Now that Docker Desktop is using WSL2 instead of its own VM, you can't see the
bastard in Hyper-V console at all... apparently the whole WSL2 VM is not seen
in Hyper-V console, even though it IS a damn VM. But it does appear in Task
Manager as "Vmmem" and taking up gigabytes of your memory.

------
brkattk
While this is generally a large improvement, there is still a glaring issue
with accessing files between the WSL and Windows
[https://github.com/microsoft/WSL/issues/4197](https://github.com/microsoft/WSL/issues/4197)

------
jdsully
I've been running this in the insider branch for the last 3 months and it's
been amazing. You can even recompile your own kernel if you want.

Your essentially getting the "real thing" with pretty seamless integration to
the rest of windows. I'd never want to go back to WSL1.

------
cowmix
WSL2 with Docker Desktop is amazing. I switched over last week and the
performance is amazing. Further, you don't have to reserve CPUs or RAM
anymore.

------
TaylorAlexander
I’m holding out for the Linux subsystem for Windows.

~~~
saagarjha
You mean Wine?

~~~
m0zg
They mean MS replacing the Windows kernel with Linux kernel. Which doesn't
sound as crazy as it did just a couple of years ago. Just put all the Windows
crap in a VM, similar to WSL2.

~~~
FpUser
"Just put all the Windows crap in a VM" \- if Windows such a crap why even
mention it? Just put Linux on your PC and be happy.

~~~
saagarjha
There's a lot of Windows-only software out there that will exist regardless of
how you feel about it.

------
evertheylen
I would really, really love to go back to using Linux natively but sadly the
hardware on this laptop is not supported well enough. So I eventually gave up
and installed Windows while using WSL2 extensively.

Performance is on par with running Linux natively. I compiled my own kernel
with ext4 encryption support, and it works quite well. I use it for 90% of my
files. Combined with the new Windows Terminal and VSCode support for WSL,
there is little friction left. (Also, to address some comments, you _can_ view
Windows files from Linux and Linux files from Windows, with some reduced
performance.)

------
sk5t
Is there a shell+terminal+font combo that folks really like for WSL? I've
tried the new terminal beta with zsh and--for reasons I can't quite articulate
right now--it feels "off" and I invariably proceed to boot up virtualbox for
my debian, i3, kitty, fira code setup to get work done. Maybe it's the break
in filesystems and $HOME?

Edit: learning that WSL2 does away with the syscall-translating tech and
mandates Hyper-V, the question of whether to look into this further becomes
thornier!

~~~
d4mi3n
Windows Terminal is made by the same guys working on WSL and works pretty
well:
[https://github.com/microsoft/terminal](https://github.com/microsoft/terminal)

You can get it via the Microsoft Store and it comes with support for
connecting to WSL, Powershell, and cmd.exe out of the box.

~~~
Gene_Parmesan
Seconding Windows Terminal. I happen to also really like the font that comes
with it -- Cascadia Code. But I'm a sucker for ligatures.

------
_ph_
A great step. but I feel I have to repeat my "ceterum censeo" of saying that
wsl would really benefit, if Microsoft would add a native Wayland support so
that the Windows Deskop would appear as a Wayland server for the Linux VM.
This would allow any Wayland-compatible Linux application to run seamlessly on
the Windows desktop and fully utilizing the native graphics drivers.

------
MAGZine
I recently wanted to run some linux apps on windows (simple stuff like ls,
ssh-keygen, etc) and found that most instructions were actually pointing me to
install a ubuntu VM rather than use the native subsystem stuff touted a couple
years ago.

I was a little disappointed in this. Running a VM is a lot more hassle than
just running the apps natively.

Feels like a step backwards than a step forward.

------
bithavoc
What’s the energy consumption of WSL2, I understand it’s a Virtual Machine
now, isn’t that heavier than what WSL1 is?

------
abol3z
I've been using WSL1 for a long time now and I am very happy with it.

The way I use it is to have all my files and project on windows FS and I code
using windows software (VSCode, Eclipse) but when I build and test, I use
WSL1, and I didn't feel that the performance was that bad since I have an SSD
and I don't mind waiting for few more minutes to rebuild a project.

But the most important thing for me was that I didn't care about managing
another file system. All my files are still on windows where I used to keep
them, file sync and backups are working as expected, and I easily browse and
edit these files on the Windows side.

For docker, I installed docker on Windows and hooked Docker CLI on WSL1 to it
using some configurations. and I was happy with it.

The question is, for the way I use WSL1, will WSL2 be an improvement or a
drawback for me? and should someone like me switch to WSL2?

------
lostmsu
Original announcement: [https://devblogs.microsoft.com/commandline/wsl2-will-
be-gene...](https://devblogs.microsoft.com/commandline/wsl2-will-be-generally-
available-in-windows-10-version-2004/)

------
0x49d1
But how the VM implementation is faster then "native" call translations?

~~~
pjmlp
There is no need to catch up with ongoing implementations.

------
AltruisticGapHN
I would love to use Windows WSL full time, along with docker containers, for
general web development.

There is one thing though that no one talks about.. the fonts!!! The font
smoothing is awful on Windows... will this ever change?

The new terminal looks alright, the default font is nice; but most other
programs I like look awful in Windows: Sublime Text, VSCode, gVIM, ... I just
can't find a monospace font that looks "thick" enough for readability and have
smooth edges -- especially with dark text on light background.

------
pixelbash
> WSL extension allows for the VS Code UI to run on the Windows side with a VS
> Code Server running within the WSL VM

This was why I have finally switched away from developing on windows, there's
something about the VS remote code server setup that will spawn tons of
processes and eventually slow WSL to a crawl. Possibly my fault, I haven't
gone through all my extensions and settings carefully, but also not an issue
when running VS code on unix without the server.

------
comity
Does anyone know if WSL2 supports utf8 characters in filenames, such as ":"
and "<>" etc?

WSL had a limitation that it couldn't display such characters when I accessed
a Linux parition through Samba. I know there is a Samba workaround for name
mangling, but I prefer to access the actual filenames as created by org-mode.

Edit: Samba was running in an Alpine VM that mounted a ZFS partition. The
network folder was mounted through Windows.

------
mikkelam
Slightly off topic but, I've been a mac user for some 6 years now and was
recently forced to switch to either linux or windows for a deep learning
desktop experience. I'm wondering how complete the windows experience will
feel as a long-time unix user? Windows seems to have everything these days
with WSL, great programming, gaming, media/rendering environments as well as
super stable. What's bad?

~~~
RMPR
WSL1 has some unimplemented features, but overall it's not a bad experience.

------
bad_user
I have a MacBook Pro that I wanted to turn into a Windows laptop.

Unfortunately if you install Windows from scratch, without going through
Bootcamp to install it side by side with MacOS, Hyper-V support is disabled.

This means that I cannot use WSL2. Or Windows, since without a working Linux
environment it's useless to me and I don't want to invest in WSL v1. Might as
well go for Ubuntu 20.04.

~~~
hectorchu
I found a way to run Windows from scratch and have Hyper-V enabled. Just
install rEFInd boot manager and use 'enable_and_lock_vmx true' in the config.

~~~
bad_user
Hi, any article on the subject I could read?

This is the first time I hear of rEFInd.

~~~
hectorchu
This is a good article:

[https://dea.nbird.com.au/2017/02/24/enabling-vt-x-on-mac-
boo...](https://dea.nbird.com.au/2017/02/24/enabling-vt-x-on-mac-book-air-in-
bootcamp/)

~~~
bad_user
Thanks ´･ᴗ･`

------
riskyfive
I really hope apple implements something similar, would much prefer to have a
well integrated linux vm than the not-quite-linux of macos

~~~
jchw
This is an interesting take considering Linux is Unix-like and macOS is
technically a BSD derivative. I don’t think macOS will ever have a Linux
syscall translation layer/subsystem (WSL1) nor a lightweight VM with special
integration (WSL2) but you can do sort of similar things in third party
software, I think. Docker for Mac is using the native VM framework and
includes a filesystem integration called osxfs, but despite mentioning the
source code in documentation it does not appear to be open source at this
time?

~~~
riskyfive
doesn't macOS put a BSD translation of some sort in their kernel? Theres a
microkernel, a driver api (device kit) and then 'bsd'

~~~
riskyfive
random wikipedia image that somewhat supports what I was thinking
[https://en.wikipedia.org/wiki/Darwin_(operating_system)#/med...](https://en.wikipedia.org/wiki/Darwin_\(operating_system\)#/media/File:Diagram_of_Mac_OS_X_architecture.svg)

~~~
saagarjha
The actual API layers are nowhere near that clean ;)

------
Karupan
So WSL2 is supported on windows 10 Home as well, which is great. Does that
mean Home also gets official Hyper V support?

~~~
francislavoie
I don't see any mention that it'll be on Home, "General Availability" just
means that it's no longer part of the insider preview

~~~
Karupan
According to FAQ [1] it will be.

[1] [https://docs.microsoft.com/en-
us/windows/wsl/wsl2-faq#does-w...](https://docs.microsoft.com/en-
us/windows/wsl/wsl2-faq#does-wsl-2-use-hyper-v-will-it-be-available-on-
windows-10-home)

------
kitotik
Out of curiosity, what do most people use this for?

(I tried rewording this question a few times to not sound snarky, but failed.)

~~~
kyriakos
Web development primarily

~~~
pjmlp
Web development with node and ruby it seems.

Java and .NET Web development has been perfectly fine the last decades.

~~~
kyriakos
Node, PHP, anything Docker all seem to work better under WSL2 than windows
itself.

~~~
pjmlp
Node and PHP has been running in Windows just fine for years everytime I have
to deal with them.

Also node is not going to stop downloading the whole Internet regardless of
the host OS.

------
cable2600
I just used VirtualBox by Oracle with Linux Mint. Seems less buggier and I can
share files with Dropbox, etc.

------
m0zg
Have they figured out how to pass through the GPU yet? Would be cool to use
this for e.g. PyTorch.

~~~
p1esk
Unfortunately no. This would have been a very useful feature to me since
currently I use a Windows laptop to write code to run on a linux gpu server
under my desk.

------
rvz
This is great news. Looks like I neither need a separate Linux VM or dual
booting Ubuntu desktop install anymore for testing my software given it will
also run on WSL2 on general availability.

Another clever move from Microsoft and the Windows Teams.

------
sandGorgon
WSL2 is a fantastic product. The ability to debug python code on ubuntu and
alt-tab to Steam is unparalleled.

However there is a fundamental issue - Microsoft is treating this as a toy
project. The number 1 problem is that the file system inside an Ubuntu
shell/wsl2-container is sitting inside a hidden file system.

It is is not exposed to the rest of windows and neither to backup tools like
Dropbox, etc. So you have a huge chance of losing important documents inside a
WSL2 container. Now, you can "Cd /c/Documents" and do your work - but this
filesystem is unimaginably slow. Not sure if it is because of file mounts,
etc. The performance is incredibly bad.

If there are WSL2 devs here - please make the working container filesystem as
a first class directory inside the rest of windows. I'll live with performance
issues for a while...but this is a blocker.

~~~
ccmcarey
I think this is not correct.

You can go to \\\wsl$\ and it shows each wsl install as a network drive.

~~~
sandGorgon
yes - however those paths are not available to any backup system. if you want
to switch from ubuntu to fedora, there is no easy way to do it. If you
accidentally uninstall ubuntu, you will lose that partition (and all your
work). this has happened to me once already.

In linux, you just have a separate /home partition . You can have a dozen
operating systems, merrily using the same home partition. you can trash your
OS, but your home directory doesnt get trashed.

i have a pending request to offer the concept of a "home directory". the
filesystem on which i work inside wsl2 should not be opaque to the rest of the
operating system.

------
criddell
Back in the 80's wasn't there some issue with Microsoft having to pay AT&T
royalties for Xenix and in order to get out of that agreement, they had to
agree to stop doing anything related to Unix?

------
tyingq
_" unzipping tarbars could see a 20 times performance increase"_

Took me several reads to figure out that "tarbars" was a typo for "tarballs".
Thought I'd missed some new archive format.

------
Gimpei
Would be nice if it had GPU support so I could use it for deep learning
prototyping. I might use Windows instead of Ubuntu then. I can't use macos now
that they dropped Nvidia.

~~~
DeathArrow
I did ML stuff under Windows.

------
executesorder66
I always laugh when I think about this. Microsoft's tools are so bad that they
had to ship an entire other OS in their own OS just so that programmers can be
productive.

------
tasubotadas
I am super excited about this. WSL1 is great. WSL2 will allow me to run docker
images without struggling with vagrantfiles so that's awesome.

------
DeathArrow
Great! Now I can run Tux Racer on Windows properly!

------
mosdl
How does this work with IDEs like IntelliJ? I believe WSL 1 had issues with
having Windows IntelliJ and the source code being in WSL?

~~~
francislavoie
Works just fine, but FS is slow-ish. Your paths look like:

\\\wsl$\Ubuntu-18.04\home\username

------
bayesian_horse
We need a Linux subsystem for Windows...

Though Wine is quite good.

~~~
rossy
While similar in concept, Wine is better than WSL1 in a lot of ways due to
supporting sound, graphics, and GPU acceleration.

I've always been suspicious of WSL because it follows a narrative that
benefits Microsoft - that Linux is primarily a command-line/server
environment, and the graphical and audio applications for Linux are not
worthwhile. It doesn't have to be like this. WSL1 was based on an Android
environment for Windows Phone called Project Astoria, which did support
graphics.

~~~
sullyj3
The graphical and audio applications for linux _aren 't_ worthwhile, or at
least they're not competitive with the top proprietary offerings. It's not
really about the theoretical capacity of of linux to support audio and
graphics. The low market share of desktop linux makes it not economically
worthwhile for top proprietary software companies to port to linux. That's
just an unfortunate fact. I don't really want to edit graphics with Gimp when
Photoshop exists, and I don't really want to produce music in Ardour when
Ableton Live exists.

I think the only real way to fix this is to change the economic incentives by
increasing desktop Linux market share, which is a long and uphill battle.

~~~
bayesian_horse
Blender is competitive in the industry and definitely "worthwhile". Not the
market-leader, but being used increasingly in professional settings.

------
tuananh
the performance on /mnt issue is not yet fixed
[https://github.com/microsoft/WSL/issues/4197](https://github.com/microsoft/WSL/issues/4197)

------
hexagonsun
honestly, i use WSL to ssh into servers in a pinch and get things taken care
of... my experience actually trying to develop things (python/django/node) has
been poor otherwise.

~~~
stinos
If it's just ssh, what's the benefit over using it on WSL compared to using
the native ssh in Windows?

------
miloshadzic
I seem to perhaps be in the minority here, but I got onto the slow ring just
for WSL2 and it has been excellent so far. I am primarily a Ruby developer and
things _just work_.

------
smitty1e
Windows seems to be gradually trending toward an OSX-style desktop experience
riding on top of a Linux kernel.

~~~
pjmlp
Except it isn't, that Linux kernel runs on top of a Hyper-V instance,
alongside the NT kernel which is managing the whole show.

More z/OS and less UNIX.

~~~
smitty1e
For now.

~~~
pjmlp
Even if Microsoft was willing to throw away what makes Windows have the
desktop market that Linux will never have, and go back to its Xenix roots,
Linux would probably get as much back as it has been getting from all those
Android OEM contributions.

So not really a reason to cheer what would be yet another pyrrhic victory in
the desktop/mobile space.

~~~
smitty1e
> Microsoft was willing to throw away what makes Windows have the desktop
> market

I certainly neither said, implied, or agreed with that concept, no.

------
ngcc_hk
As they are different there should be option to do both 1 and 2

~~~
nhumrich
There is.

------
yuz
Back to Cygwin?

------
pojntfx
Y.

------
oxalorg
I've been a happy user of WSL2 since 2 months, and I absolutely love it. After
switching to it, I completely stopped using Mac Mini and Linux.

It has made my life so easier. All the Linux stuff + development work gets
done inside Windows Terminal + WSL2 + NeoVim, and I still get to keep Windows
for Gaming, Designing, Office work, other random programs etc.

~~~
rfoo
I've been a happy user of running a Linux VM (without X) besides Windows since
6 years ago (first VirtualBox, then Hyper-V after switching to Win10) :p

Congrats to WSL2 team, they introduced this pattern to a much wider audience.

~~~
vbezhenar
Yep, using VirtualBox and it works fine for me. I don't use Hyper-V because
it's buggy with my build for some reason (Nvidia driver crashes, BSODs). I
don't really get this WSL 2 hype.

------
chmln
In genuine amazement at a lot of the comments here - why not just dual boot
Linux instead of using it in a VM? Productivity on a Linux machine can be so
far ahead of Windows, especially if you've got a terminal-based workflow an
maybe a tiling WM

~~~
LeonM
My workflow is mostly terminal based, and I used to use tiling WMs, yet I am
now back to Windows + WSL.

Why? Because GPU driver compatibility is still so bad on Linux that I can't
get any of the popular distros to work properly on my setup (laptop with
hybrid Intel/nVidia GPU setup, thunderbolt dock, external display with
different scaling than laptop display).

And yes, if I spend a weekend fiddling with Nouveau drivers I might get it to
run somewhat decently, but really I don't want to spend that time on my work
setup. Window + WSL works out of the box, so I'll use that.

~~~
wayneftw
I have been on Manjaro with XFCE for the past couple of years and it's a
dream. Haven't had one driver problem. Zoom, Slack and Beyond Compare all work
without issue as does VS Code. Installing and updating all software via the
package manager UI is so much better than Windows that I'll never go back.
Furthermore, I think that XFCE provides a better Windows experience for
developers than Windows does - at least I don't have to find, download and
install 7+ taskbar tweaker or hack the system configuration registry to get
the features I want out of it.

Mixing business and gaming on the same machine caused problems for me even
when I was fully on Windows, so I've always kept separate machines for that.

