windowsterminal-shell icon indicating copy to clipboard operation
windowsterminal-shell copied to clipboard

Make script open WSL2 in current windows directory

Open AlbyTree opened this issue 4 years ago • 3 comments

I'm using WSL2 with Ubuntu 18.04 on Windows Terminal: I was wondering if it was possible to use your script to open WSL2 in the current windows directory. At the moment, it just opens Windows Terminal with Ubuntu in its own home folder.

AlbyTree avatar Nov 16 '20 10:11 AlbyTree

I just noticed that I was using the command "commandline" : "wsl.exe ~" in the Windows Terminal settings file...the script actually opens Windows Terminal with WSL2(and Ubuntu 18.04) in the current windows directory.

AlbyTree avatar Nov 18 '20 08:11 AlbyTree

I just noticed that I was using the command "commandline" : "wsl.exe ~" in the Windows Terminal settings file...the script actually opens Windows Terminal with WSL2(and Ubuntu 18.04) in the current windows directory.

did u find the fix same is happening with me as well , wsl 2 opens in its home directory

iamLazyCode avatar Jan 11 '23 18:01 iamLazyCode

I had the same problem, make your profile in Windows Terminal settings has "commandline": "wsl.exe" and not "commandline": "wsl.exe ~" or "commandline": "Ubuntu.exe"

BassemHalim avatar Apr 27 '23 07:04 BassemHalim