Terminal: How to make wsl go to $HOME directory

Created on 16 Apr 2020  路  8Comments  路  Source: microsoft/terminal


When I first use wsl, it go to /mnt/c/Users/NOVA this directory,I dislike that,I want it just go to $HOME directory

Area-Settings Issue-Docs Issue-Question Needs-Attention Needs-Triage Product-Terminal Resolution-Answered

Most helpful comment

@WSLUser I don't think so, it sounds like this user is trying to configure their WSL profile to go to ~ by default. (ps did you mean microsoft/WSL?)

@NOVA-ME try setting your startingDirectory to

"startingDirectory":"\\\\wsl$\\<your distro>\\home\\<your username>"

So for my "Ubuntu 18.04" instance, that's

"startingDirectory":"\\\\wsl$\\Ubuntu-18.04\\home\\zadjii"

All 8 comments

@WSLUser I don't think so, it sounds like this user is trying to configure their WSL profile to go to ~ by default. (ps did you mean microsoft/WSL?)

@NOVA-ME try setting your startingDirectory to

"startingDirectory":"\\\\wsl$\\<your distro>\\home\\<your username>"

So for my "Ubuntu 18.04" instance, that's

"startingDirectory":"\\\\wsl$\\Ubuntu-18.04\\home\\zadjii"

Well there's a way to configure it in WSL but it does help we have a profile setting as well. It was filed as docs issue so that's why I chose the WSL docs issue tracker. Should of thought about the use of profile to work around using WSL to change it (this is one of the things that make Terminal great to work with for WSL).

@WSLUser I don't think so, it sounds like this user is trying to configure their WSL profile to go to ~ by default. (ps did you mean microsoft/WSL?)

@NOVA-ME try setting your startingDirectory to

"startingDirectory":"\\\\wsl$\\<your distro>\\home\\<your username>"

So for my "Ubuntu 18.04" instance, that's

"startingDirectory":"\\\\wsl$\\Ubuntu-18.04\\home\\zadjii"

Yes, thank you so much, my english is poor

@WSLUser I don't think so, it sounds like this user is trying to configure their WSL profile to go to ~ by default. (ps did you mean microsoft/WSL?)

@NOVA-ME try setting your startingDirectory to

"startingDirectory":"\\\\wsl$\\<your distro>\\home\\<your username>"

So for my "Ubuntu 18.04" instance, that's

"startingDirectory":"\\\\wsl$\\Ubuntu-18.04\\home\\zadjii"

I have another question, how to make the first time open the terminal just go to my ubuntu wsl

I have another question, how to make the first time open the terminal just go to my ubuntu wsl

@NOVA-ME If you mean that you want to launch WSL instead of Powershell when you launch the Windows Terminal, you can do that by changing the value of defaultProfile in your configuration file to the WSL profile's guid. See here for more info. 馃槃

I have another question, how to make the first time open the terminal just go to my ubuntu wsl

@NOVA-ME If you mean that you want to launch WSL instead of Powershell when you launch the Windows Terminal, you can do that by changing the value of defaultProfile in your configuration file to the WSL profile's guid. See here for more info. 馃槃

Thank you,I got it

% KZ{(2TQWVS$SN_0%@B89O

It is perfect now.I love it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NickITGuy picture NickITGuy  路  3Comments

wkbrd picture wkbrd  路  3Comments

warpdesign picture warpdesign  路  3Comments

ghvanderweg picture ghvanderweg  路  3Comments

waf picture waf  路  3Comments