Feature Request #2580

Closed
opened 2026-01-30 22:58:50 +00:00 by claunia · 6 comments
Owner

Originally created by @pastra98 on GitHub (Jul 5, 2019).

I'm pretty new to using linux, and don't understand much, but my issue is the following:
Every time I use the linux subsystem in windows 10, I want to work in the same directory, where my repos are located. I want to switch to the new terminal app, but every time I open a new linux terminal, it starts out in my windows system 32 directory, whereas I would like it to start where my repositories are located. Using the terminal that's provided with the ubuntu for windows app, I simply made a new shortcut, that starts in my desired location. Any way to do this with the new app?
tldr: start new linux terminal at a specific directory instead of /mnt/c/WINDOWS/system32
sorry if this is the wrong place to ask this.

The json offers the option to specify a starting directory for both powershell and cmd. If possible, it would be awesome to have that same option for a new bash instance.

Originally created by @pastra98 on GitHub (Jul 5, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> I'm pretty new to using linux, and don't understand much, but my issue is the following: Every time I use the linux subsystem in windows 10, I want to work in the same directory, where my repos are located. I want to switch to the new terminal app, but every time I open a new linux terminal, it starts out in my windows system 32 directory, whereas I would like it to start where my repositories are located. Using the terminal that's provided with the ubuntu for windows app, I simply made a new shortcut, that starts in my desired location. Any way to do this with the new app? **tldr: start new linux terminal at a specific directory instead of /mnt/c/WINDOWS/system32** sorry if this is the wrong place to ask this. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> The json offers the option to specify a starting directory for both powershell and cmd. If possible, it would be awesome to have that same option for a new bash instance. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-QuestionArea-SettingsResolution-AnsweredProduct-Terminal labels 2026-01-30 22:58:50 +00:00
Author
Owner

@carlos-zamora commented on GitHub (Jul 5, 2019):

The startingDirectory setting works for WSL sessions too. Just add it to the profile you want in the "profiles.json" file. startingDirectory also takes environment variables, so feel free to add that in as one (or create an environment variable for where your repos are located).

@carlos-zamora commented on GitHub (Jul 5, 2019): The `startingDirectory` setting works for WSL sessions too. Just add it to the profile you want in the "profiles.json" file. `startingDirectory` also takes environment variables, so feel free to add that in as one (or create an environment variable for where your repos are located).
Author
Owner

@pastra98 commented on GitHub (Jul 7, 2019):

The startingDirectory setting works for WSL sessions too. Just add it to the profile you want in the "profiles.json" file. startingDirectory also takes environment variables, so feel free to add that in as one (or create an environment variable for where your repos are located).

thanks, just didn't think of simply adding it to the json😄. this helped me a lot...

@pastra98 commented on GitHub (Jul 7, 2019): > The `startingDirectory` setting works for WSL sessions too. Just add it to the profile you want in the "profiles.json" file. `startingDirectory` also takes environment variables, so feel free to add that in as one (or create an environment variable for where your repos are located). thanks, just didn't think of simply adding it to the json😄. this helped me a lot...
Author
Owner

@Luuk34 commented on GitHub (Jul 7, 2019):

   {
            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "Campbell",
            "commandline" : "wsl.exe -d Ubuntu",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "bar",
            "fontFace" : "Consolas",
            "fontSize" : 10,
            "guid" : "{2c4de342-38b7-51cf-b940-2309a097f518}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
            "name" : "Ubuntu",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "startingDirectory" : "/mnt/c/TEMP",
            "useAcrylic" : false
        },

What is missing in this profile, because it is not starting in the startingDirectory?
(and, YES, the directory '/mnt/c/TEMP' does exist)

@Luuk34 commented on GitHub (Jul 7, 2019): ``` { "acrylicOpacity" : 0.5, "closeOnExit" : true, "colorScheme" : "Campbell", "commandline" : "wsl.exe -d Ubuntu", "cursorColor" : "#FFFFFF", "cursorShape" : "bar", "fontFace" : "Consolas", "fontSize" : 10, "guid" : "{2c4de342-38b7-51cf-b940-2309a097f518}", "historySize" : 9001, "icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png", "name" : "Ubuntu", "padding" : "0, 0, 0, 0", "snapOnInput" : true, "startingDirectory" : "/mnt/c/TEMP", "useAcrylic" : false }, ``` What is missing in this profile, because it is not starting in the `startingDirectory`? (and, YES, the directory '/mnt/c/TEMP' does exist)
Author
Owner

@carlos-zamora commented on GitHub (Jul 7, 2019):

Took me a bit but finally figured it out. Try "startingDirectory" : "/TEMP".

@carlos-zamora commented on GitHub (Jul 7, 2019): Took me a bit but finally figured it out. Try `"startingDirectory" : "/TEMP"`.
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 7, 2019):

This is because startingDirectory refers to a Windows path.

@DHowett-MSFT commented on GitHub (Jul 7, 2019): This is because `startingDirectory` refers to a Windows path.
Author
Owner

@pastra98 commented on GitHub (Jul 8, 2019):

this is what it looks like for me, now that I've added startingDirectory to the bash settings:
"startingDirectory" : "%USERPROFILE%/Projekte/Programming/Python/GithubRepos",
because at first, it was missing startingDirectory.

@pastra98 commented on GitHub (Jul 8, 2019): this is what it looks like for me, now that I've added startingDirectory to the bash settings: `"startingDirectory" : "%USERPROFILE%/Projekte/Programming/Python/GithubRepos",` because at first, it was missing startingDirectory.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2580