microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.26k stars 812 forks source link

WSL doesn't automatically mount drive letters added by subst command #10311

Open ioweb-gr opened 1 year ago

ioweb-gr commented 1 year ago

Windows Version

Microsoft Windows Version (0S Build 22621.1992)

WSL Version

WSL version: 1.2.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.90.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Add your disk in drive letter E:

Then in cmd execute subst D: E:\ subst G: E:\

Wsl doesn't mount D and G at /mnt/d and /mnt/g

Expected Behavior

D: and G: are mounted

Actual Behavior

They are not mounted

Diagnostic Logs

No response

nurbles commented 1 week ago

This might need to be a different issue, but I have found that WSL commands (e.g. "ubuntu config --default-user steve") will fail if there is a SUBST drive in the PATH variable. This is a pretty significant issue for me, since I also use VS2022 with VCPKG located on a SUBST drive.