0
votes

I'm trying to access, using explorer.exe, the file structure/any file I've made using the WSL terminal, but any guide I've found online leads to a dead end.

If I use:

explorer.exe .

The explorer window opens to system32, where I can't see any wsl/linux/ubuntu related files. If use explorer.exe [any file name] it opens to my windows documents folder with nothing related to wsl.

Any tutorial I've found says that explorer.exe . should just open to the root location, but system32 isn't that. I also can't got to \\wsl$ in the file explorer, which is recommended by a couple of guides, but that results in a network error from windows.

I can see the WSL desktop name in my network tab in explorer, but can't see any file structure, and all it says it "this folder is empty" with no options to create new files or anything.

Please help!

An edit to clarify:

When in root (username@desktop:~$), when i run explorer.exe . it opens the system32 folder of my windows installation. When i search in there for linux, wsl, anything like that, the only things that come up are exe files or config files. No folders.

FINAL EDIT:

This issue is fixed by updating windows to anything after the 1903 version of windows 10. After doing that, using explorer.exe . works perfectly.

2
I see more persons with the same problem. Maybe superuser.com/q/1338991/1083266 helps. - Walter A
This issue was fixed by updating windows to anything after the 1903 version, where MS added the feature to wsl. After doing that, using "explorer.exe ." worked as intended. - HeyItsGwen

2 Answers

0
votes

I'm a little unclear as to what you are asking but if you are in the WSL bash shell and run the command cmd.exe /c start . you should see file explorer open in the dir you are in.

damo@laptop:/mnt/c/Windows/System32$ pwd
/mnt/c/Windows/System32    
damo@laptop:/mnt/c/Windows/System32$ cmd.exe /c start .
  <opens file explorer in c:\Windows\System32>
damo@laptop:/mnt/c/Windows/System32$ cd ~
damo@laptop:~$ pwd
/home/damo
damo@laptop:~$ cmd.exe /c start .
  <opens file explorer in c:\Windows\System32>
damo@laptop:~$ cd /mnt/c/stuff
damo@laptop:~$ cmd.exe /c start .
  <opens file explorer in c:\stuff>

Run the following to create an alias alias start='cmd.exe /c start which would allow you to simply run start . from any directory.

If you are asking how you view the linux directory structure in windows, the recommendation is "don't", you should not mess with linux files from within windows it will corrupt the wsl installation. I guess when you are in /home/user/ and run start . wsl is stopping you (protecting you) for your own good by not letting you into the linux files.

hope this helps, let me know.

0
votes

This problem is fixed by updating windows to anything after the 1903 version of windows 10. After doing so, using explorer.exe . works as intended.