The path you are in when opening a new WSL tab is determined by
This parameter needs to be a valid Windows path, which isn’t great if we want to end up in
/home/kamner inside WSL.
The nice thing about WSL is that it will resolve windows paths into their equivalent WSL/linux path if possible.
C:\Scripts would resolve to
Using this and the neat trick that the WSL filesystem is exposed as a a hidden fileshare ([[technology/windows/wsl-hidden-fileshare]]) we can get to where we want.
To get the hidden fileshare path of your home directory navigate to it and open it with
cd ~ explorer.exe .
This will give you a strange hidden network share path in explorer. Just use that as
startingDirectory and we are all set.