Skip to content

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

Closed

Description

@0xbadfca11
  • 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.

Activity

  1. ziggythehamster commented on Feb 16, 2019

    @ziggythehamster

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

  2. changed the title [-]Can not pushd to path under \\WSL$\[/-] [+]Can not pushd or `net use` to path under \\WSL$\[/+] on Feb 18, 2019
  3. benhillis commented on Feb 19, 2019

    @benhillis
    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?

  4. 0xbadfca11 commented on Feb 20, 2019

    @0xbadfca11
    Author

    Ben Hillis (@benhillis) I definitely opened and have not stopped Ubuntu.

  5. jstarks commented on Feb 20, 2019

    @jstarks
    Member

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

  6. benhillis commented on Feb 20, 2019

    @benhillis
    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.

  7. 0xbadfca11 commented on Feb 21, 2019

    @0xbadfca11
    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

  8. changed the title [-]Can not pushd or `net use` to path under \\WSL$\[/-] [+]Could not mapping path \\wsl$\<distro_name> to network drive[/+] on Feb 22, 2019
  9. 0xbadfca11 commented on Mar 28, 2019

    @0xbadfca11
    Author

    Fixed in 18865 (Skip Ahead).

  10. Biswa96 commented on Mar 28, 2019

    @Biswa96

    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.

  11. jstarks commented on Mar 28, 2019

    @jstarks
    Member

    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>.

  12. LiamKarlMitchell commented on May 20, 2020

    @LiamKarlMitchell

    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.

  13. BeomohKim commented on Mar 21, 2023

    @BeomohKim

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

  14. getify commented on Mar 22, 2023

    @getify

    Someone should definitely pin this message from Liam Mitchell (@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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions