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

Unless there's a way to share the files from Windows in to WSL, then I can't do that. We need to be able to edit the files from within Windows (people want their VSCode/Sublime Text/Notepad++). I've tried to tell them to get Linux machines or Mac's, but that doesn't work for everyone either.


For the VSCode situation, there is a Remote extension by Microsoft for editing files that live on the WSL2 side.

For everything else you can just use the network mount to WSL2. So the performance hit will be on the editor I/O side but not the application runtime.


> We need to be able to edit the files from within Windows (people want their VSCode/Sublime Text/Notepad++).

You can browse directly to the WSL container filesystem through Windows by browsing to:

\\wsl$

Example: click Start --> Run --> "\\wsl$"

Is that what they're looking for?


I use VS Code's native integration with WSL. So VS Code runs as a native Windows app with nearly everything you'd expect, but the actual files being read/saved are inside WSL. Works great with Vagrant, Docker for Desktop, Git etc.


Yep, this works really well and for directly accessing files in WSL 2's file system from Windows, @lenova's sibling comment goes over that process.

To expand on that, I also have this path in my Windows explorer "Quick access" list: \\wsl$\Ubuntu-20.04\home\nick

It's a shortcut to my home directory inside of WSL 2 for quick access. It's useful in the cases where I want to drag / drop a photo or something from Windows into WSL 2's world.




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

Search: