This guide shows you how to change the starting directory for Windows Terminal profiles, so every new tab or window opens in a folder you choose instead of the default. You’ll edit the settings.json file—no extra tools needed, just the built-in editor.
What You’ll Need
- Windows 10 or 11 with Windows Terminal installed (from the Microsoft Store or GitHub).
- Basic comfort with editing JSON files—the settings file is plain text.
- Optional: a specific folder path you want to open by default (e.g.,
D:\ProjectsorC:\Users\YourName\Documents).
Step-by-Step
- Open Windows Terminal. Press Win and type “Terminal”, then press Enter. If you don’t have it, install it from the Microsoft Store first.
- Open the settings file. Click the down arrow (chevron) next to the new tab button (the ⌄ icon) in the title bar, and select Settings. Alternatively, press Ctrl + , (comma).
- Switch to the JSON editor. In the Settings window, look for the Open JSON file button (usually bottom-left corner, an icon with braces
{ }). Click it. This openssettings.jsonin your default text editor (often Notepad). - Locate the profile you want to change. In the JSON, find the
profilesobject, then thelistarray. Each item in that array is a profile (e.g., PowerShell, Command Prompt, Ubuntu). Identify the one you use by itsnameorsourcefield. - Add or edit the
startingDirectoryproperty. Inside that profile’s{ }block, add a line like this (if it doesn’t already exist):
"startingDirectory": "C:\\Users\\YourName\\Documents"
Replace the path with your desired folder. Use double backslashes (\\) in the JSON string, or a single forward slash (/)—both work. For example: "D:/Projects".
- Save the file. Press Ctrl + S in your text editor. Windows Terminal automatically reloads the settings—no restart needed.
- Test it. Open a new tab (Ctrl+Shift+T) or a new window. It should start in your chosen directory. If not, check the Troubleshooting section below.
Common Mistakes
- Wrong profile. Editing the default profile but opening a different one (e.g., you changed PowerShell but you’re using Command Prompt). Check the profile’s
name. - Invalid path. Using a path that doesn’t exist, has typos, or uses single backslashes that get interpreted as escape sequences (like
\nfor newline). Always use double backslashes or forward slashes. - Missing quotes. Forgetting to wrap the path in double quotes—JSON requires them.
- Editing the wrong section. Putting
startingDirectoryoutside the profile’s{ }block, e.g., in the globaldefaultsorprofilesobject—it won’t apply to any profile. - Not saving. Forgetting to save the file before testing—Windows Terminal only reads the file on save.
Tips
- Use environment variables. You can use
%USERPROFILE%to reference your home folder, e.g.,"%USERPROFILE%\\Documents". This works in most cases and makes the path portable. - Set it for all profiles at once. To apply the same starting directory to every profile, add
"startingDirectory": "C:\\Your\\Path"inside thedefaultsobject (which is insideprofiles). This is a time-saver if you use multiple shells. - Use a WSL path. For WSL (Windows Subsystem for Linux) profiles, the starting directory uses a Unix-style path, e.g.,
"//wsl$/Ubuntu/home/yourname"or"/home/yourname". Double slashes are needed for UNC paths. - Relative paths are not supported. The starting directory must be an absolute path—Windows Terminal does not expand
~or relative paths. - Check the settings UI. Some profiles allow you to set the starting directory in the graphical settings (under “Startup directory”)—that’s an alternative to editing JSON manually.
Troubleshooting
New tabs still open in the old directory. First, ensure you saved the JSON file. Then verify you edited the correct profile—open the dropdown arrow and see which profile you’re using. If you’re using the default profile, check that the startingDirectory is in that profile’s block, not in defaults unless you want it everywhere.
Windows Terminal shows an error or resets settings. A syntax error in the JSON will cause Windows Terminal to ignore the file and may show a popup. Open the file and check for missing commas, extra brackets, or unescaped characters. You can validate JSON by pasting it into a validator like JSONLint.
The path with spaces doesn’t work. Spaces are fine as long as the path is enclosed in double quotes. If you’re using a path like C:\My Folder\Sub, it should work—but make sure you didn’t accidentally break the JSON with an unescaped backslash.
It worked but only for the first tab. If you have multiple profiles and you changed only one, other profiles will still use their own defaults. Also, if you have a startup action that opens specific tabs, those may override the default.
Using a network path (UNC). For paths like \\server\share, you must escape backslashes: "\\\\server\\share" in JSON. Alternatively, use forward slashes: "//server/share"—Windows Terminal accepts both.
Frequently Asked Questions
Q: Can I set different starting directories for different profiles?
A: Yes, each profile has its own startingDirectory property. Edit each profile’s block individually.
Q: What is the default starting directory if I don’t set one?
A: It’s typically the Windows Terminal installation folder or your user profile folder, depending on the profile. For PowerShell, it’s often C:\Users\YourName.
Q: Can I use a relative path like ..\Projects?
A: No, Windows Terminal requires an absolute path. Use a full path like C:\Users\YourName\Projects.
Q: How do I reset to the original default?
A: Remove the startingDirectory line from the profile (or set it to null). Then save the file—Windows Terminal will revert to its built-in default.
Q: Does this work for WSL profiles?
A: Yes, but the path format is different. Use a Unix-style path like //wsl$/Ubuntu/home/yourname or /home/yourname (with double slashes for the UNC format).
Q: Why does my path with a backslash get corrupted?
A: In JSON, a single backslash starts an escape sequence. To write a literal backslash, you need two: \\. For example, C:\\Users\\Name. Using forward slashes (C:/Users/Name) avoids this issue entirely.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix 0x80070005 DISM Error & the 0x800070005 Typo
- Fix Access Denied Adding Shared Printer in Windows 10
- How to Play Minesweeper: Rules, Tips, and Winning Strategy
- Browser SQL Sandbox for Games: Build Guide
- Remote Desktop Connection in Windows: How to Open
- Snapchat Face Swap: Step-by-Step Guide