3

I used to be able to type \\wsl$\Ubuntu in the address bar in MS Windows File Explorer and I would be able to browse my WSL files.

After an automated Windows update, now I cannot access my WSL files the same way as I used to.

Currently I get this error: Windows cannot access \\wsl$\Ubuntu Check the spelling of the name.

However, I still can use that very same path in PowerShell:


PS C:\Users> cd \\wsl$\Ubuntu
PS Microsoft.PowerShell.Core\FileSystem::\\wsl$\Ubuntu> ls


    Directory: \\wsl$\Ubuntu


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         28-Apr-21     14:58                bin
d-----         10-May-18     10:17                boot
d-----         08-Oct-21     14:08                dev
d-----         08-Oct-21     14:08                etc
d-----         19-Jul-18     18:21                home
d-----         30-Nov-18     13:17                lib
d-----         10-Nov-20     18:48                lib64
d-----         10-May-18     10:14                media
d-----         10-Jun-20     09:12                mnt
d-----         28-Apr-21     15:01                opt
d-----         08-Oct-21     14:08                proc
d-----         22-Jun-21     10:29                root
d-----         08-Oct-21     14:08                run
d-----         02-May-21     15:18                sbin
d-----         11-Apr-18     15:11                snap
d-----         10-May-18     10:14                srv
d-----         08-Oct-21     14:08                sys
d-----         08-Oct-21     14:09                tmp
d-----         24-Sep-19     10:48                usr
d-----         10-May-18     10:17                var
------         01-Jan-70     01:00         636192 init


PS Microsoft.PowerShell.Core\FileSystem::\\wsl$\Ubuntu>

The files are still accessible under this path:


C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\

Nevertheless, I'd like to be able to use the old path. Does anybody know what can I do to get it back?

Or if there is a new 'short path' I could use, then would somebody please let me know about it?

I'm running Windows 10 21H1 (OS Build 19043.1237) with WSL 1:


# wsl.exe -l -v
  NAME      STATE           VERSION
* Ubuntu    Running         1

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:        16.04
Codename:       xenial

These are the updates is question:

2021-09 Cumulative Update for Windows 10 Version 21H1 for x86-based Systems (KB5005565)

2021-09 Cumulative Update Preview for .NET Framework 3.5 and 4.8 for Windows 10 Version 21H1 for X86 (KB5005539)

Thanks a lot in advance!

PS: upgrading to WSL2 is not an option.

3 Answers 3

2

I know I sound like a broken record (since I commented on your Stack Overflow question), but do not under any circumstances attempt to access WSL1 files through ..\LocalState\rootfs\. It can cause corruption.

As for the Explorer integration, it sounds a lot like this issue. There seem to be two possible solutions:

  • For some, just turning off and back on "Windows Subsystem for Linux" in Optional Features seems to do the trick. Your existing Ubuntu instance should be fine, but you may want to back it up via wsl --export Ubuntu Ubuntu_backup.tar first, just in case.

    You'll definitely need to apply the changes -- Just ticking the WSL checkbox on-and-off, of course, won't work.

  • If the "easy way" doesn't work, then check the registry entries as recommended in that Github issue:

    # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\ProviderOrder
    # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
    # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
    

    If you see P9NP (the Plan 9 Network Provider) in the first registry entry (ProviderOrder), but not in the latter two, then edit the Order and HWOrder entries to include it as the first item in the comma-separated list.

    A reboot might be required.

1

Also do check that nothing has turned off the Virtual Machine Platform behind your back - as following the above steps and then doing this solved the issue for me.

1
0

I'd just like to add to NotTheDr01ds' answer that in addition to re-ordering the keys at: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder and Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order...

Also edit the value for P9NP at Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\ProviderOrder ...make it a decimal value lower (indicating priority) to something lower than any cbfs values.

I went with P9NP 100 since I have a cbfs5 250 and cbfs20 175... and it persisted through reboots. I'll have to wait and see if it persists through upgrades as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.