WSL: Linux not appearing in file explorer; cannot use `wslview`

Windows Version

Microsoft Windows [Version 10.0.26063.1]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-microsoft-standard-WSL2

Distro Version

Ubuntu 20.04

Other Software

wslu v4.1.1-1

Repro Steps

Running wslview <filename> I get,

Start : This command cannot be run due to the error: Element not found.
At line:1 char:128
+ ... oding(437); Start "\\wsl.localhost\Ubuntu\home\mdema\school\cpsc416\c ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

(I believe this is related), also, in file explorer, Linux doesn’t appear in the left side bar and I cannot normally access files. I previously had some folders within WSL pinned to quick access; when I click them, I get Element not found.

For the second problem, I have a found a workaround. If I directly put \\wsl.localhost in the address bar, it takes me to the WSL root (with the Ubuntu folder accessible as expected).

Expected Behavior

wslview should open the file.

Linux should be visible in file explorer. Quick links should take me to the specified directory under WSL.

Actual Behavior

wslview reports, for all files

Start : This command cannot be run due to the error: Element not found.
At line:1 char:128
+ ... oding(437); Start "\\wsl.localhost\Ubuntu\home\mdema\school\cpsc416\c ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Linux item is missing from file explorer.

Diagnostic Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 35

Most upvoted comments

If you navigate to

\\wsl$

then right click on the Ubuntu folder and map network drive. You can then start pinning folders from within it again. You can also view it under “This PC”. Hope this helps anyone else.

Windows 11 Pro 24H2 WSL Version: 2.4.5 (Pre-release)

Getting this after 24H2 win11 update: all wsl quick access links were gone after the update. Updated wsl to 2.3.24.0, after which I created a new quick access link to wsl: this worked fine when tested immediately. Tried to access it after ~10 mins (new explorer window) get the error message: “Element not found”. Also noted: quick access menu now very flaky. RMB shows different menus or doesn’t change to selected item. Slow to draw and flickers to different items on draw.

Edition Windows 11 Pro Version 24H2 OS build 26100.1742 Experience Windows Feature Experience Pack 1000.26100.18.0

wsl --version WSL version: 2.3.24.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.65 MSRDC version: 1.2.5620 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.1742

I can confirm. Looks like Windows tried to install a WSL update today, and now my pinned folders from WSL in the file explorer are gone, as well as the Linux shortcut. Accessing via \\wsl.localhost or \\wsl$ still works, but pinning new folders to the quick access are not clickable.

Found one related entry in the event viewer: Installation Failure: Windows failed to install the following update with error 0x80073D02: 9P9TQF7MRM4R-MicrosoftCorporationII.WindowsSubsystemforLinux

Also getting a lot of warnings from RestartManager, one each for C:\Windows\System32\vmwp.exe, C:\Windows\System32\dllhost.exe, C:\Program Files\WSL\wslhost.exe, C:\Program Files\WSL\wslrelay.exe, C:\Program Files\WSL\msrdc.exe: Application 'C:\Program Files\WSL\wslrelay.exe' (pid 18420) cannot be restarted - Application SID does not match Conductor SID.

Doing a system restore brought WSL back for a short period, now it’s gone again.

EDIT: Slight difference between my end and OP’s: wslview still works for me (but I am not using it actively). Quick access items completely disappeared on my end instead of giving an Element not found error.

Same as @MGB-Hadean above, all my quick access pins disappeared. I can add them back, but they either give me “Element not found” as above, or do nothing in a dialogue.

>wsl --version
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2033

Image

I opened a new issue for this given this one is closed: https://github.com/microsoft/WSL/issues/12173

I can confirm the same issue. I installed the latest windows 11 update (KB5034848) and now Linux icon is gone. When I try to open via \\wsl.localhost and try to pin the folder on left, nothing happens. All my previous pins related to WSL have also been disappeared.

I upgraded from Windows 11 22h2 to 24h2 this week and this 1 year old issue started happening. Not sure why this issue was closed.

$ wslview .
Start : This command cannot be run due to the error: Element not found.
At line:1 char:128
+ ... oding(437); Start "\\wsl.localhost\Ubuntu-24.04\home\borges\Projects\ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

After clicking on pinned WSL folder: Image

I’ve found a workaround. Map your WSL network drive to a local drive in windows, following these instructions. WSL may not appear in the network browsed options, just type\\wsl.localhost\Ubuntu (or your corresponding distribution) in the ‘Folder’ field. Then your WSL directory will be accessible from the local drive letter you’ve assigned to it (for instance W:).

I only updated by wsl version to 2.4.12.0 using the command below and it got solved.

wsl --update --pre-release

still has this problem.

WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2605

Can confirm this update fixes my issue at least. For those wondering, run

$ wsl --update --pre-release
Checking for updates.
Updating Windows Subsystem for Linux to version: 2.1.5.

2.1.5 fixed both the File Explorer issue and wslview so I’m happy, but I’ll leave the issue open since there are other related things going on.

Can confirm the same behavior as well: (no icon, previous quick access pins deleted, not able to make new pins) Able to use \wsl$ from the explorer bar. wsl --version output:

WSL version: 2.1.4.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60 MSRDC version: 1.2.5105 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.3155

Confirmed broken path when make quick access

WSL version: 2.3.26.0 Kernel version: 5.15.167.4-1 WSLg version: 1.0.65 MSRDC version: 1.2.5620 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.2605

Fixed in 2.2.1