-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL2: can't access linux file system from windows #4260
Comments
Note: running This is a blocker, preventing me from opening a project located on the linux file system in VSCode. |
Things I'd try: |
I am mounting I ruled that out, though, because Would you mind giving me some more information on how I can debug this using dmesg? VSCode remoting to WSL works quite nicely, btw. |
Another troubleshooting idea: If you go into File Explorer and type in: |
Ah, so from File Explorer, browsing to
Can't quite tell if this is a permissions issue, or 'invalid address'... any ideas? |
This seems to be an error with the Plan 9 server. @SvenGroot is the resident expert for this area! |
I suddenly have this issue too after upgrading to 18932. It worked previously but with issues (#4262) |
But I don't know if it's permanently or not. |
@erikhakansson's steps didn't change the problem for me. |
I'm struggling with the same and the linked issue wasn't my problem - the registry values were already correct. |
Same here. \wsl$ is very unstable and drops from time to time. This seems to have something to do with number of writes - I often have the problem after working with a project from VSCode (and save the files several times). It can be decieving that sometimes \wsl$\ can still be accessed, but this is from cache. If you try to actually open the files using notepad/vscode you will still have a filesystem error. Restarting WSL with wsl --shutdown seems to fix it temporarily. |
I am seeing exactly the same issue on my Windows 10 1903 18941.1001. |
Exact same issue on Windows 10 1903, but when running |
I've updated to 1903 18362.356 as of yesterday and I'm having this issue as well
I tried to:
I have another PC where that works as expected on 1903, |
Hi I seem to have exactly the same problem as David-Defoort, but with the Debian distro. |
This solution worked perfectly for me. Thanks! |
I am now on 10.0.18362.388 and retried the disable wsl and that was successful (not sure if this is permanent or not). |
When it happens, I usually do "Get-Service LxssManager | Restart-Service" from the PS (Run as administrator). |
There have been a handful of fixes around the \wsl$\ paths so things should be much more robust now. Please reopen a new issue if you continue to see issues after build 19002. |
It would be great if it'd be possible to map a network drive that points to a folder in the Linux subsystem: Unfortunately that doesn't work and I don't see other options for editing those files with editors like JetBrains' (I'm talking about running the editor from the host, not the VM of course). Any ideas? |
fracasula, come at it from the other angle. All of your windows files are accessible from within the linux distro under /mnt/, so just store the files there. That way, both windows and linux has access to them. |
@fracasula Does simply mapping \\wsl$\Ubuntu-18.04 not work for you? You should be able to do that and then access the folder as Z:\root\Code. Is there any reason you have to map the specific folder to a drive? |
I was still having this problem up until today. Previously, my lowercase file path worked, |
I did not know that was possible, thanks 👍 |
FWIW. I was having issues with file watching when storing files Windows side, so depending on your needs, accessing files via |
@ElanHasson
All the best! --Daniel |
This issue (or a related one) should really be reopened @benhillis. It's been nearly a year and this is still not working properly. I've had to resort to creating a .bat file which makes it easier to create a "network" drive to my ubuntu files:
|
Is there any update? Still experiencing this. Can map a network drive to \wsl$\Ubuntu and access its contents. But explorer or any other window executable (launched from Windows or from a WSL prompt) can access \wsl$\Ubuntu. Win 1903 build 18362.1139 Ubuntu 20.04.1 LTS (Focal Fossa) |
I know it's not much of a help. But my HD crashed a few weeks ago which forced me to reinstall Windows. Now everything is working fine. |
I had tried solutions listed in this topic, but in my case it occured that I didn't have wsl.config in my Ubuntu, now after adding the file with default settings, I can access Ubuntu from Windows and all problems are solved ( |
@saltazaur 's solution worked for me. I had the |
It worked for me as well. I added this to my Debian install and I haven't had any issues since. Nice catch. Someone should probably make a new thread to report the missing conf files and reference this issue. |
@saltazaur solution worked for me as well!
|
If you're using wsl2 this will cause a MASSIVE performance penalty. Always edit from inside your distro. If you use your distro with Windows paths, this is going to be very slow. This is NOT a solution, it's not even a good workaround. |
I have the same problem. After feature upgrade to 20h2, linux filesystem is inaccessible to windows. VS Code remote works perfectly fine inside the distro. I need to be able to browse my project files for editing things other than code. |
I just hit this issue. I can access Docker Desktop WSL folders but can't access my Ubuntu installation folders: All file exploring tools I tried from Windows hang infinitely connecting to the folder (Explorer, PowerShell, Total Commander). The distro is accessible from the terminal and works well. Shutting down WSL doesn't help. System reboot helped. |
Same as @speller , I'm on the fast ring of insider, with WSL kernel version 5.10.81.1 |
For me the solution was to run: I got an icon like this in Network locations: Despite the Disconnected Network Drive, when I File Explorer this Drive, I can see the Linux file system from Windows. Happy days:) PD: I have WSL2 (Ubuntu-20.04) and Windows 10 Thanks, @ElanHasson ! |
its very important to do it from cmd.exe and NOT using Powershell for mapping the network drive!!! |
I think there is, for example to access network files in a specific location without traversing back and forth between directories. See WSL2 network drive authentication issue |
I was struggling with this issue for a while but today I stopped using the "default" install of Ubuntu that comes with WSL and installed a separate version (Ubuntu 20.04) and I havent encountered this issue on 20.04. Maybe thats the workaround? Install something separately from the store and that wont give you issues? EDIT: Nevermind... its back... |
This issue should be reopened... |
Please fill out the below information:
Your Windows build number: 10.0.18922.1000
What you're doing and what's happening:
Using visual studio code's bash terminal for WSL, I
cd ~
and attempt toexplorer.exe .
as per documentation here: https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes#place-your-linux-files-in-your-linux-root-file-systemWhat's wrong / what should be happening instead:
Instead of opening
explorer.exe
at the corresponding folder in the linux file system, I get the error:The text was updated successfully, but these errors were encountered: