3 ms·
You can interact with your Windows filesystem from WSL2, though the performance is worse than the VM's own filesystem. Additionally you can access WSL2's files
by cameronh90 6y ago
You can interact with your Windows filesystem from WSL2, though the performance is worse than the VM's own filesystem. Additionally you can access WSL2's files through the \\wsl$ share. For example, /mnt/c/windows/notepad.exe ~/file launches notepad on my Windows desktop and opens ~/file from WSL2. While the integration isn't perfect, it is usable.
The reason I prefer it to MacOS is that it is actually a real Linux kernel with all the trimmings - such as apt, docker, eBPF etc. My recent experience on MacOS is that every update seems to break Brew, which, while better than MacPorts, doesn't even work all that well to begin with. MacOS is a weird BSD with poorly documented closed source system components such as launchd. If that's your thing, it's fine - but I personally find the Mac/BSD userspace unpleasant to work with and am tired of fighting against it every time Apple decide to break my attempts to make it more tolerable.
Versus a VM it's less clear, but the integration is actually fairly good, each of your WSL2 "distros" start instantly, you can launch them to the current directory in Explorer or use them from Windows Terminal without SSHing. For the most part, it _feels_ like Ubuntu is just a part of Windows.
My workflow with WSL2 is that I keep most of my repos in the Windows desktop and use Windows versions of JetBrains' IDEs or VSCode for most of my work, but then I use WSL for docker/kubernetes, running CLI-oriented things like vim, ffmpeg, imagemagick, shell scripts, python, terraform, etc.
Plus, I have a Ryzen 5950X with 128GB memory, which isn't strictly a limitation of MacOS, but it certainly makes my life a lot better!