You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Could not mapping path \\wsl$\<distro_name> to network drive #3854
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.
What's wrong / what should be happening instead:
pushd does change current directory under \\wsl$\.
like this tweet.
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?
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."
Reacted by Samuel, Jaroslav Živný, Saba Ahang, Vadym Serhiyovych Hapanchak, Gunnar Jänicke, Micah Loffer, 张昆, Ezequiel Cavallo, Dipen Chauhan, Annan Fay Yearian and 6 more
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
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.
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.
Reacted by anderswei, newBweb, Danny Feliz, Joris van Eijden, Tomas Fülöpp, Vincent Nijs, Aaron Hogue, Ben Hizak, Jacob Smith, wdspider and 41 more
Reacted by michael-ts
Reacted by The GOAT, Kyle Simpson, Lourencosm and Dmitry Starosta
Reacted by Ivan Bovin, Arek W, Rahul Vaidya, James Keller, dgw and 加藤宏怜
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.
Reacted by Mike Ribbons, Michał Panasiewicz and dgw
Activity
ziggythehamster commentedon Feb 16, 2019
CMD.exe does not support UNC paths consistently. Use PowerShell.
[-]Can not pushd to path under \\WSL$\[/-][+]Can not pushd or `net use` to path under \\WSL$\[/+]benhillis commentedon Feb 19, 2019
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 commentedon Feb 20, 2019
Ben Hillis (@benhillis) I definitely opened and have not stopped Ubuntu.
jstarks commentedon Feb 20, 2019
This was a known issue. I believe net use and pushd will be fixed in a subsequent build.
benhillis commentedon Feb 20, 2019
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 commentedon Feb 21, 2019
In build 18342, Mostly works expected.


However, found one function that is not working properly.
Right click
\\wsl$\<distro_name>, thenMap network drive...."Folder" field will be
<distro_name>, missing\\wsl$\.I will get "Error code: 0x80070043 The network name cannot be found."
[-]Can not pushd or `net use` to path under \\WSL$\[/-][+]Could not mapping path \\wsl$\<distro_name> to network drive[/+]0xbadfca11 commentedon Mar 28, 2019
Fixed in 18865 (Skip Ahead).
Biswa96 commentedon 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,
initprocess remains after disconnecting that drive.jstarks commentedon 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 commentedon 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\ubuntuBut can mount
\\wsl$\Ubuntu-20.04Possibly by design.
BeomohKim commentedon Mar 21, 2023
I'm suffering the same phenomenon.
with Microsoft Windows [Version 10.0.19042.2364]
getify commentedon Mar 22, 2023
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.