Hacker News new | ask | show | jobs
by petterroea 52 days ago
I, for one, have had to explain to Juniors multiple times that WSL isn't Linux, and why it's no replacement for Linux. Happens almost every time they try to do anything more advanced than a WSL hello world, and it inevitably fails.

I still let them try, because it beats me having to check "is wsl good now", and they learn much better from personal experience than someone more senior who uses arch btw just telling them "don't use windows"

8 comments

Interesting, I've been using it with zero issues (including performance) for several years now. Compiled stuff, ran scientific calculations, trained neural nets with GPU passthrough, even switched over a workload from an old Red hat box to WSL Alma.

Only weirdness has been systemd can sometimes be quirky, and GUI stuff can be glitchy (which doesn't affect me much, because 99% of what I do is in the terminal)

So, anecdotally it is perfectly adequate for workloads beyond a Hello World. What issues are you running into?

Mostly its related to filesystem and permissions. Interface between windows and Linux, and mismatch in how the two work.

Compute etc is fine!

Yeah its best to avoid using the windows filesystem for anything else but a source of cp -r
/mnt/c etc from within WSL, and access to Linux FS paths are effectively a plan-9 file share service... Beyond this, if you use Docker Desktop (or similar) with volumes on the host OS (Windows or Mac) it's a weird FS sync between the host and container environment)... if you do volumes in WSL2 inside a Linux/WSL environjment it works fine (normally).

Permissions between Windows and Unix are always (generally) a mismatch, as is the nature of OS differences.

Hardly any different from mounting UNIX filesystems that don't obey exactly the same semantics.
WSL1 is not Linux because it is mapping system calls from the Linux kernel ABI to NT. That sounds like what you're describing. WSL2 is a Microsoft distro running in a VM that integrates into Windows.

I use WSL2 every day and it has some annoying quirks with how their Wayland implementation behaves with DWM, but otherwise it's just a Linux environment.

WSL2 isn't exactly a distro. there's CBL-Mariner, which is a distro used for utility/plumbing, but it's pretty hidden internally. WSL2 is mostly:

1) a lightly-patched Linux kernel

2) a bunch of esoteric bridge stuff, namely:

2A) 9P for mounting the Windows filesystem on Linux and vice-versa,

2B) a Wayland server implemented via RDP(?!)

2C) Hyper-V NICs, dynamic memory and other VM integrations.

2D) even weirder esoterica like whatever magic lets CUDA work (and... directx? for reasons??)

but there's no canonical (pun intended) userspace. there are many Linux distros available; adapting a distro is usually pretty easy. for example, NixOS-WSL is lightweight and works quite well.

philosophically, WSL2 is a VM, but it's not an emulator, if that makes sense. there's a kind of convergence between OS and VM that's been going on for a decade and WSL2 has been riding that wave.

(disclaimer: I work for MS but not on Windows or WSL. I just think the arch is neat.)

$ uname -a Linux MYPC 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Dunno, looks pretty Linux to me.

(WSL1 did suck badly because it combined the limitations of NT - slow file ops and process spawn - with the limitations of a compatibility layer. WSL2 is good enough for compatibility testing work on e.g. dotnet)

It's still running with windows as a host, and I've been met with friction and weird quirks in the interaction between them every time I have tried to use it myself, or watched someone else do so.
WSL 2.0 is literally a Linux VM running on top of Hyper-V, hardly any different of running a VM on a cloud vendor.

Nowadays WSL implies version 2.0, who is still using the half done implementation of WSL 1.0?

Or using Virtual Box, VMWare Workstation, QEMU,...

As someone who develops for both Windows and Linux I find WSL to be very useful. Much better than my previous method of dual booting Linux and Windows. I've yet to run into a problem that I needed to boot into native Linux for.
WSLv2 is indeed Linux... kernel and all... it's running in effectively a transparent VM with some utilities to aid in auto-mounting windows drives for access. WSLv1 used a translation layer (akin to WINE) to translate linux calls to windows calls. but WSL2 is indeed Linux.
Actually, WSL is pretty good for development. Of course, I wouldn't use WSL to run server software.
wsl2 is literally just a linux vm isn't it?
Yep, running on Hyper-V.