Skip to content

Instantly share code, notes, and snippets.

@rxw1
Created June 30, 2023 12:23
Show Gist options
  • Save rxw1/3b6ed0c6d03fcd2cde9e5c6c128bdacc to your computer and use it in GitHub Desktop.
Save rxw1/3b6ed0c6d03fcd2cde9e5c6c128bdacc to your computer and use it in GitHub Desktop.
Fix Windows 11 explorer.exe not seeing mounted files in WSL2

Fri Jun 30 02:21:11 PM CEST 2023


Fix Windows 11 explorer.exe not seeing mounted files in WSL2

Problem

  • Windows 11 explorer.exe (and any other application running on Windows) is not being able to browse additionally mounted WSL2 directories.

  • The problem seems to be caused by Windows' User Account Control (UAC) and may appear after a Windows update without manually changing any setting.

Solution

  • As mentioned here microsoft/WSL#7834 (comment), the issue is fixed by disabling UAC and rebooting Windows.

  • What is not mentioned in the above issue, is, that the issue will still be fixed after UAC is enabled again after disabling it.

  • So, in other words:

  1. Disable UAC:
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
  1. Reboot
  2. Enable UAC:
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
  1. Reboot
  • Windows applications should be able to access WSL mounts normally again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment