WSL: WSL2 to can't browse in `/mnt/c`
Please fill out the below information:
-
Your Windows build number:
10.0.18917.1000 -
What you’re doing and what’s happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.) in wsl:
ls /mnt/c -
What’s wrong / what should be happening instead: the folder is empty. Should have listed my
Usersfolder etc
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 35 (9 by maintainers)
what helped me was to shutdown wsl then run it again
powershell -> wsl --shutdown powershell -> wsl
then i got it back
I had the same issue and in my case it was because I added:
in
wsl.conf. I think when using WSL2 you can comment or delete this file.(then you’ll have to restart WSL with
wsl --shutdown)This fixed it for me. Thank you!
@onomatopellan Disabling the Fast Startup solves the issue for me
@JoshuaCWebDeveloper That sounds a lot like Fast Startup. I always disable it because it’s incompatible with dual booting.
I think my error is different. C is indeed mounted, its just not browsable. I can do
ls /mnt/c/Users/myUserName, but notls /mnt/cI have similar options in .conf to run docker per these instructions, something in those settings cause the same behavior reported here, which appears to be expected behavior
If you compiled a custom kernel be sure that VIRTIO is set:
I met this problem too, on windows 10 home 2004, version 19041.572 At first I guess maybe it’s caused after windows sleep or hibernate. Now it seems I met this every time after system boot. Need “wsl --shutdown” to make /mnc/c work.
I just had this problem happen for the second time since converting an instance from WSL 1 to WSL 2 a little over a week ago.
In both cases, the problem happened after attempting to access the
/mnt/cdirectory right after booting Windows. In both cases, the problem was resolved by simply restarting Windows. The first time I was mucking around with the network settings, and so I blamed it on something I did. However, since then, it had been working fine until this morning when the problem happened again; I had made no changes to the environment in the interim.Running
ls -la /mnt/cshows an empty directory, runningls -la /mnt/c/Usersreturns no such file or directory. I do not have any/etc/wsl*file.@edwindijas What service initializing scripts are you using? I do indeed have a Windows batch script that is run on logon by the Task scheduler, this batch script calls
ifconfigandservice ssh starton myubuntu1604instance.