Skip to content
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

Could not mapping path \\wsl$\<distro_name> to network drive #3854

Closed
0xbadfca11 opened this issue Feb 16, 2019 · 12 comments
Closed

Could not mapping path \\wsl$\<distro_name> to network drive #3854

0xbadfca11 opened this issue Feb 16, 2019 · 12 comments
Assignees

Comments

@0xbadfca11
Copy link

  • Your Windows build number:
    Microsoft Windows [Version 10.0.18836.1000]

  • What you're doing and what's happening:
    In command prompt, could not pushd under \\wsl$\.
    Other file I/O or application can access under \\wsl$\.
    I tried "Fresh Start" from Windows Defender app. But this did not solve it.

C:\Users\JohnDoe>pushd \\wsl$\Ubuntu\home\john
The network path was not found.

image

  • What's wrong / what should be happening instead:
    pushd does change current directory under \\wsl$\.
    like this tweet.
C:\Users\JohnDoe>pushd \\wsl$\Ubuntu\home\john

Z:\home\john>

See our contributing instructions for assistance.

@ziggythehamster
Copy link

CMD.exe does not support UNC paths consistently. Use PowerShell.

@0xbadfca11 0xbadfca11 changed the title Can not pushd to path under \\WSL$\ Can not pushd or net use to path under \\WSL$\ Feb 18, 2019
@benhillis
Copy link
Member

@0xbadfca11 - This should work, although there are some more changes inbound to the prerelease branch. Can you verify that the distribution is already running when you try this?

@0xbadfca11
Copy link
Author

@benhillis I definitely opened and have not stopped Ubuntu.

@jstarks
Copy link
Member

jstarks commented Feb 20, 2019

This was a known issue. I believe net use and pushd will be fixed in a subsequent build.

@benhillis
Copy link
Member

This should work in the 18342 19h1_release. The fix is making its way to the rs_prerelease branch and should be there soon.

@0xbadfca11
Copy link
Author

In build 18342, Mostly works expected.
However, found one function that is not working properly.
Right click \\wsl$\<distro_name>, then Map network drive....
"Folder" field will be <distro_name>, missing \\wsl$\.
I will get "Error code: 0x80070043 The network name cannot be found."
image
image

@SvenGroot SvenGroot self-assigned this Feb 21, 2019
@SvenGroot SvenGroot added the bug label Feb 21, 2019
@0xbadfca11 0xbadfca11 changed the title Can not pushd or net use to path under \\WSL$\ Could not mapping path \\wsl$\<distro_name> to network drive Feb 22, 2019
@0xbadfca11
Copy link
Author

Fixed in 18865 (Skip Ahead).

@Biswa96
Copy link

Biswa96 commented Mar 28, 2019

@0xbadfca11 That was fixed in 18860 build. BTW, does Explorer shows correct size of that drive? In my case, Explorer shows the 'Used Space' of the actual drive instead of my distribution installed size. Is it by-design? Another thing, init process remains after disconnecting that drive.

@jstarks
Copy link
Member

jstarks commented Mar 28, 2019

This is by design--we don't track the amount of space the distro is using.

The init process will timeout after a while, or you can terminate it manually with wsl -t <distro name>.

@LiamKarlMitchell
Copy link

LiamKarlMitchell commented May 20, 2020

Also just a note, unable to map a directory in the distro to a drive but can map the distro share.
Can't mount \\wsl$\Ubuntu-20.04\home\ubuntu
But can mount \\wsl$\Ubuntu-20.04

Possibly by design.

@BeomohKim
Copy link

I'm suffering the same phenomenon.
with Microsoft Windows [Version 10.0.19042.2364]

@getify
Copy link

getify commented Mar 22, 2023

Someone should definitely pin this message from @LiamKarlMitchell as it's probably the main reason people see this error now. You can only map a drive to a WSL root, not to any arbitrary dir inside that file system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants