Skip to main content

How to change the default directory in Windows Terminal

How to change the default directory in Windows Terminal
(Image credit: Laptop Mag)

Windows Terminal is an application for users of command line tools such as PowerShell, Command Prompt and WSL. It is an open-source project. Windows Terminal offers multiple tabs; UTF and Unicode character support, and a customizable interface. 

By default, it opens to the current user directory. If you would like to change that, you have to change the settings. The settings interface is perfunctory. For editing a setting like the default directory, you have to add code to the settings.json file, which isn’t as scary as it sounds.

The following steps show how to change it for the Powershell profile. Follow the same steps for each profile.

1) In Windows Terminal, click the down arrow.

(Image credit: Laptop Mag)

2) In the menu that opens, click Settings.

(Image credit: Laptop Mag)

3) In the left pane, click Actions.

(Image credit: Laptop Mag)

4) In the right pane, click Open JSON file.

(Image credit: Laptop Mag)

5) Scroll down to the code block for PowerShell profile marked by the comment “Make changes here to the powershell.exe profile”.

(Image credit: Laptop Mag)

6) Add a comma at the end of the code block so that you can add another line of code.

(Image credit: Laptop Mag)

7) Add "startingDirectory": "C:\\" on the next line.

(Image credit: Laptop Mag)

8) Click File on the menu bar.

(Image credit: Laptop Mag)

9) In the File menu, click Save.

(Image credit: Laptop Mag)