Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wait what? I'm not a Windows user, so I haven't used any version of WSL, but WSL 2 doesn't store the files on the Windows side? It seems to me that the whole "easy access to your Windows files in a Linux environment" was the point of WSL.


WSL1 is really just a new system call interface for Windows.

WSL2 uses "disks" emulated via image files that are stored as ordinary Windows files (but in a secret place). This makes most file I/O from inside WSL2 faster than from inside WSL1.

WSL2 can use the Windows file system (and vice versa) via file servers.

When a Linux app inside WSL2 wants to use a Windows file, the Linux kernel (there is only ever one for all running WSL2 images!) talks to a Windows app that does the file serving.

When a Windows app wants to use a Linux file from a WSL2 image, the image first has to run (might take a little while for it to boot) and then a daemon there serves the file to the Windows app.

I think one of the file servers use a version of the 9P protocol. Maybe they both do.

https://en.wikipedia.org/wiki/9P_(protocol)

Things that do lots of file I/O (such as compiling) are way faster under WSL2 using local file systems than under WSL1.


Wsl 2 can access files in windows, but it is very slow.


With the benefit of Linux and its filesystem being super (natively) fast in WSL2.

What I've very often done is use command line tools like compilers, search&replace etc inside WSL2, in a Windows terminal. You have the benefits of speed and all the CLI tools of the Linux world. And then have the GUIs, like vscode, running on Windows. Vscode has its server running on the WSL side, so still very good performance.

Best of both worlds, since the GUIs and the CLIs are tightly integrated.


That's the crux of the issue. Vscode works ok because you can run it as a server, but other IDEs (yes there are others) are slow.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: