How to Set the Default Starting Directory in Windows Terminal

Windows Terminal is the awesome terminal Microsoft in 2019. It's a great replacement for those of us who used Cmder. It goes great with Powershell, Cmd, and Windows Subsystem for Linux!

Windows Terminal stores the settings in a JSON file. You can update the settings by pressing Ctrl+, or in the UI by clicking the arrow at the top of the screen.

Windows Terminal Settings Windows Terminal Settings

The JSON file settings should open in your default editor. In the JSON object, you will want to scan for Profiles. Within Profiles, there is a list property that is an array of the different profiles you have. These are the same as in the drop-down menu pictured above.

You can create a unique starting directory for each profile. Add a "startingDirectory" property to each profile you want modified.

{
    // Make changes here to the cmd.exe profile.
    "guid": "{bcaa0dfd-32be-5c36-ajff-afcb3eaa6101}",
    "name": "Command Prompt",
    "commandline": "cmd.exe",
    "hidden": false,
    "startingDirectory": "C:\\dev\\"
}

Windows Terminal will convert your paths for Windows Subsystem for Linux too. If you have a profile with Ubuntu like below:

{
    "guid": "{08bc2e3e-fe2c-5eb3-bc23-bx142edcc273}",
    "hidden": false,
    "name": "Ubuntu-20.04",
    "source": "Windows.Terminal.Wsl",
    "startingDirectory": "C:\\dev\\"
}

Windows Terminal will open up the /mnt/c/dev/ directory for you.

One Last Thing...

If you have a question or see a mistake, please comment below.

If you found this post helpful, please share it with others. It's the best thanks I can ask for & it gives me momentum to keep writing!

Matt Ferderer
Software Developer focused on making great user experiences. I enjoy learning, sharing & helping others make amazing things.
Let's Connect