WSL2 is more capable, but it's not Windows anymore. I might as well run a proper Linux VM or dual boot. Better yet, I'd rather run a Windows VM in a bare metal Linux OS. Why even bother with WSL2? What's the value add?
WSL2 is more capable, but it's not Windows anymore. I might as well run a proper Linux VM or dual boot. Better yet, I'd rather run a Windows VM in a bare metal Linux OS. Why even bother with WSL2? What's the value add?
GPU access. Actual graphics use is so so, but essential for doing CUDA/AI stuff
Faster file system access on the Linux side (for Linux compiles etc). Ironically, accessing Windows filesystem is slower than WSL1.
Better Linux compatibility.
Vs a Linux VM:
GPU access!
Easier testing for localhost stuff, Linux ports get autoforwarded to Windows (if your test http server is running in WSL2 at port 8080, you can browse to http://localhost:8080 in your Windows browser)
Easy Windows filesystem interaction. Windows local drives show up in /mnt automatically.
Mix Windows commands with Linux commands. I use this for example to pipe strings.exe, which is UTF-16 aware, with Linux text utils.
I think WSL2 tends to be better at sharing memory (releasing unused memory) with the rest of the system than a dedicated VM.
You can mimic some of this stuff to a degree with a VM, but the built in convenience facetor can't be overlooked, and if you are doing CUDA stuff there isn't a good alternative that I am aware of. You could do PCI passthrough using datacenter class GPUs and Windows Server, but $$$.
Obviously you don't do the thing you're writing about. A "proper" Linux VM would incur more work for you and would be less useful. Dual boot would remove your ability to use the computer for activities that need a Windows OS. Running a Windows VM on Linux would take you down a rabbit hole of pain and annoyances, unless your use case for Windows is extremely limited.
If I'm running Windows, it means that the files and projects that I care about are on the Windows file system. And they need to be there, because my IDE and other GUI apps needs files to be on a real file system to work optimally. (A network share to a WSL2 file system would not let the IDE watch for changes, for instance.)
WSL1 was a great way to get a UNIX-style command line, with git, bash, latex etc., for the Windows file system. WSL2 was just too slow for this purpose; commands like "git status" would take multiple seconds on a large codebase.
Now I switched back to MacOS, and the proper UNIX terminal is a great advantage.
You can call windows programs from linux (e.g. explorer.exe .)