How to make wsl go to $HOME directory #7436

Closed
opened 2026-01-31 01:04:00 +00:00 by claunia · 8 comments
Owner

Originally created by @NOVA-ME on GitHub (Apr 16, 2020).

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

Originally created by @NOVA-ME on GitHub (Apr 16, 2020). <!-- Briefly describe which document needs to be corrected and why. --> 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
Author
Owner

@WSLUser commented on GitHub (Apr 16, 2020):

wrong repo. Try https://github.com/MicrosoftDocs/WSL/issues

@WSLUser commented on GitHub (Apr 16, 2020): wrong repo. Try https://github.com/MicrosoftDocs/WSL/issues
Author
Owner

@zadjii-msft commented on GitHub (Apr 16, 2020):

@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"
@zadjii-msft commented on GitHub (Apr 16, 2020): @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](https://github.com/Microsoft/WSL/issues)?) @NOVA-ME try setting your `startingDirectory` to ```json "startingDirectory":"\\\\wsl$\\<your distro>\\home\\<your username>" ``` So for my "Ubuntu 18.04" instance, that's ```json "startingDirectory":"\\\\wsl$\\Ubuntu-18.04\\home\\zadjii" ```
Author
Owner

@WSLUser commented on GitHub (Apr 16, 2020):

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 commented on GitHub (Apr 16, 2020): 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).
Author
Owner

@NOVA-ME commented on GitHub (Apr 17, 2020):

@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

@NOVA-ME commented on GitHub (Apr 17, 2020): > @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](https://github.com/Microsoft/WSL/issues)?) > > @NOVA-ME try setting your `startingDirectory` to > > ```json > "startingDirectory":"\\\\wsl$\\<your distro>\\home\\<your username>" > ``` > > So for my "Ubuntu 18.04" instance, that's > > ```json > "startingDirectory":"\\\\wsl$\\Ubuntu-18.04\\home\\zadjii" > ``` Yes, thank you so much, my english is poor
Author
Owner

@NOVA-ME commented on GitHub (Apr 17, 2020):

@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

@NOVA-ME commented on GitHub (Apr 17, 2020): > @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](https://github.com/Microsoft/WSL/issues)?) > > @NOVA-ME try setting your `startingDirectory` to > > ```json > "startingDirectory":"\\\\wsl$\\<your distro>\\home\\<your username>" > ``` > > So for my "Ubuntu 18.04" instance, that's > > ```json > "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
Author
Owner

@utybo commented on GitHub (Apr 17, 2020):

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. 😄

@utybo commented on GitHub (Apr 17, 2020): > 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](https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md#global-settings) for more info. 😄
Author
Owner

@NOVA-ME commented on GitHub (Apr 17, 2020):

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

@NOVA-ME commented on GitHub (Apr 17, 2020): > > 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](https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md#global-settings) for more info. 😄 Thank you,I got it
Author
Owner

@NOVA-ME commented on GitHub (Apr 17, 2020):

% KZ{(2TQWVS$SN_0%@B89O

It is perfect now.I love it

@NOVA-ME commented on GitHub (Apr 17, 2020): ![% KZ{(2TQWVS$SN_0%@B89O](https://user-images.githubusercontent.com/18442141/79571595-086aa500-80ee-11ea-9885-035e16ef79cf.png) It is perfect now.I love it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7436