-d option does not accept links and mounted drives in path for WSL #7401

Closed
opened 2026-01-31 01:02:57 +00:00 by claunia · 16 comments
Owner

Originally created by @iorlov1 on GitHub (Apr 13, 2020).

Environment

Windows build number: Version 10.0.18363.720
Windows Terminal version (if applicable): 0.9

Any other software?

Steps to reproduce

Run wt -d with path to mounted drive or sym link
for example: wt split-pane -d \wsl$\Ubuntu-18.04/mnt/c

Expected behavior

wt split-pane -d \wsl$\Ubuntu-18.04/mnt - works and opens terminal in /mnt

/mnt/c is mounted Windows "C" drive.
So the expectation is that terminal would open in /mnt/c

Actual behavior

[error 0x8007010b when launching `wsl.exe -d Ubuntu-18.04']

Originally created by @iorlov1 on GitHub (Apr 13, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Version 10.0.18363.720 Windows Terminal version (if applicable): 0.9 Any other software? ``` # Steps to reproduce Run wt -d with path to mounted drive or sym link for example: wt split-pane -d \\wsl$\Ubuntu-18.04/mnt/c # Expected behavior wt split-pane -d \\wsl$\Ubuntu-18.04/mnt - works and opens terminal in /mnt /mnt/c is mounted Windows "C" drive. So the expectation is that terminal would open in /mnt/c # Actual behavior [error 0x8007010b when launching `wsl.exe -d Ubuntu-18.04']
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 01:02:57 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 13, 2020):

You’re looking for -d C:\. There is no compelling reason to use the WSL path mapper just to get back to a Windows path. Just use a Windows path.

@DHowett-MSFT commented on GitHub (Apr 13, 2020): You’re looking for `-d C:\`. There is no compelling reason to use the WSL path mapper just to get back to a Windows path. Just use a Windows path.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 13, 2020):

The reason for this is that you can’t even access the Windows paths through wsl$ outside of terminal.

@DHowett-MSFT commented on GitHub (Apr 13, 2020): The reason for this is that you can’t even access the Windows paths through wsl$ _outside of terminal._
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

i can't use c:\ . with WSL terminal ...
Thats exactly the idea. to set start directory D drive for example where my working folder is, instead of launching WSL with user home and doing CD

@iorlov1 commented on GitHub (Apr 13, 2020): i can't use c:\ . with WSL terminal ... Thats exactly the idea. to set start directory D drive for example where my working folder is, instead of launching WSL with user home and doing CD
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

more over i need in fact start WSL in /mnt/d/work/git_root something and i can't
/mnt/c was given as an example.

@iorlov1 commented on GitHub (Apr 13, 2020): more over i need in fact start WSL in /mnt/d/work/git_root something and i can't /mnt/c was given as an example.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 13, 2020):

I can't

wt.exe is always going to be a Windows application. If you need to pass a Windows path, that came in as a WSL path, from WSL: use the wslpath utility.

$ wslpath -w '/mnt/c'
C:\
$ wslpath -w '/home/duhowett'
\\wsl$\Debian\home\duhowett
@DHowett-MSFT commented on GitHub (Apr 13, 2020): > I can't `wt.exe` is always going to be a Windows application. If you need to pass a Windows path, that came in as a WSL path, from WSL: use the `wslpath` utility. ``` $ wslpath -w '/mnt/c' C:\ $ wslpath -w '/home/duhowett' \\wsl$\Debian\home\duhowett ```
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

not sure why it is closed

@iorlov1 commented on GitHub (Apr 13, 2020): not sure why it is closed
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

so how can i start WSL terminal on my d drive? or /mnt/d?
Any other non-mount point folder works fine ...

@iorlov1 commented on GitHub (Apr 13, 2020): so how can i start WSL terminal on my d drive? or /mnt/d? Any other non-mount point folder works fine ...
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

i try to pass WSL path - /mnt/c. This path do exists. i can cd into it after terminal starts. But i can;t set it as startup directory

@iorlov1 commented on GitHub (Apr 13, 2020): i try to pass WSL path - /mnt/c. This path do exists. i can cd into it after terminal starts. But i can;t set it as startup directory
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 13, 2020):

Terminal is a windows program. You have to pass windows paths. Sorry.

The WSL filesystem redirector does not let you access Windows files in /mnt. I promise.

This message is from Explorer

image

This is why Terminal cannot use that path. You MUST provide the canonical Windows path.

@DHowett-MSFT commented on GitHub (Apr 13, 2020): _Terminal is a windows program. You have to pass windows paths. Sorry._ The WSL filesystem redirector **does not let you access Windows files in `/mnt`**. I promise. This message is from Explorer ![image](https://user-images.githubusercontent.com/14316954/79167788-23ab7c80-7d9d-11ea-97ea-f13c5eca4845.png) This is why Terminal _cannot use that path_. You _MUST_ provide the canonical Windows path.
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

this is not true
If i run ">wt split-pane -d \wsl$\Ubuntu-18.04/bin" from CMD

WSL will open terminal in /bin as starting directory

@iorlov1 commented on GitHub (Apr 13, 2020): this is not true If i run ">wt split-pane -d \\wsl$\Ubuntu-18.04/bin" from CMD WSL will open terminal in /bin as starting directory
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

second pane obviously in this case

@iorlov1 commented on GitHub (Apr 13, 2020): second pane obviously in this case
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 13, 2020):

That's a windows path, dude. It's using the "windows WSL redirector", \\wsl$.

@DHowett-MSFT commented on GitHub (Apr 13, 2020): That's a windows path, dude. It's using the "windows WSL redirector", `\\wsl$`.
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

so \wsl$ redirect is not able to use any windows mounts, this is what you are saying

@iorlov1 commented on GitHub (Apr 13, 2020): so \\wsl$ redirect is not able to use any windows mounts, this is what you are saying
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 13, 2020):

Yes.

The reason for this is that you can’t even access the Windows paths through wsl$

The WSL filesystem redirector does not let you access Windows files in /mnt.

@DHowett-MSFT commented on GitHub (Apr 13, 2020): Yes. >The reason for this is that you can’t even access the Windows paths through wsl$ >The WSL filesystem redirector does not let you access Windows files in /mnt.
Author
Owner

@iorlov1 commented on GitHub (Apr 13, 2020):

Understood. Thanks for clarification. Didn't know

@iorlov1 commented on GitHub (Apr 13, 2020): Understood. Thanks for clarification. Didn't know
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 13, 2020):

I'm happy to help 😄

@DHowett-MSFT commented on GitHub (Apr 13, 2020): I'm happy to help :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7401