Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting default windows terminal starting directory to folder within c drive WSL

I am trying to set my default terminal for my WSL prompt in windows terminal to start at a specific folder under the C drive.

i am able to set the default to /mnt but it wont let me go /mnt/c/<myfolder> whenever i do this is sets it back to /mnt/c/Users/<myuser>

like image 727
ajnieset Avatar asked Mar 03 '23 07:03

ajnieset


1 Answers

In settings.json if you are using the commandline property replace that line with:

"source": "Windows.Terminal.Wsl"

Then set the value of your startingDirectory to where ever you like in the C drive using the drive letter and forward slashes in the path, so it will look something like this:

"startingDirectory" : "C:/Windows/Fonts",

like image 120
apena Avatar answered Apr 06 '23 15:04

apena