Setting startingDirectory on command line for WSL2 Location Windows 11 Ubuntu 24.04 fails #18162
Labels
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Resolution-Duplicate
There's another issue on the tracker that's pretty much the same thing.
Windows Terminal version
1.21.2911.0
Windows build number
10.0.22631.4317
Other Software
Ubuntu 24.04.1 LTS inside WSL2 (2.3.24.0)
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Steps to reproduce
I followed these instructions: https://learn.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=linux#target-a-directory
which do not give any insight into WSL2 locations. (Note I prefer to use verbose options in scripts for later readability which is why I have
--startingDirectory
rather than-d
)I also tried:
--startingDirectory "~/projects/scripts"
--startingDirectory "/home/user/projects/scripts"
--startingDirectory '\\wsl$\Ubuntu\home\user\projects\scripts'
--startingDirectory "\\\\wsl.localhost\\Ubuntu\\home\\user\\projects\\scripts"
- this without the escaped\
is the location I see in Windows Explorer--startingDirectory "\\wsl.localhost\Ubuntu\home\user\projects\scripts"
- this fails with error:[error 2147942667 (0x8007010b) when launching 'ubuntu.exe'] Could not access starting directory C:\wsl.localhost\Ubuntu\home\user\projects\scripts"
Expected Behavior
Tab opens at location with title.
This worked in Windows 10 with Ubuntu 20.04 inside WSL2
Actual Behavior
Tab opens at home location (i.e.
~
) with titleThe text was updated successfully, but these errors were encountered: