Creating Shortcut Terminal Paths in Windows 11
Abstract: Configure Windows Terminal profiles to automatically launch in specific directories, eliminating manual path navigation.
2026-09-03
Created: 2026-09-03 by
UserComp.com Editors
You can create shortcut terminal paths in Windows 11 by configuring the settings.json file within Windows Terminal. This approach allows you to define custom profiles that automatically navigate to specific directories upon launch, eliminating the need to manually type long path strings every time you open a command-line interface for a project or directory.
Understanding Windows Terminal Profiles
Windows Terminal manages its configuration through a single JSON file named settings.json. Each entry under the profiles section represents a distinct way to access a shell. While most users rely on standard entries like "Command Prompt" or "PowerShell," creating a custom profile enables you to specify not just which executable to run, but also what initial working directory should be used. This feature is particularly useful for developers who frequently switch between multiple projects located in different drives or deep folder structures. By pre-defining these paths, you ensure consistency and reduce context-switching friction during your workflow.
Locating the Configuration File
To begin editing your terminal settings, first open Windows Terminal. You can do this by searching for "Terminal" in the Start menu or using the keyboard shortcut Ctrl + Shift + M. Once the application is running, locate the dropdown arrow next to the tab name or use the gear icon in the top-right corner of the window. Select the Settings option from the menu. This action will open the settings interface in your default web browser, displaying the raw JSON content. Alternatively, you can directly navigate to the file location in File Explorer. The file is typically stored at %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json. Editing this file directly requires a text editor like Notepad or Visual Studio Code, whereas the UI method provides a more guided experience for beginners.
Creating a Custom Profile Entry
Inside the settings.json file, look for the profiles object, which contains an array of objects under the list key. To add a new shortcut path, insert a new object into this array. You must assign a unique guid to this profile, which acts as its internal identifier. You can generate a GUID using online tools or PowerShell commands if needed. Set the name property to something descriptive, such as "My Project Folder." Crucially, you need to specify the commandline property. This should point to your preferred shell executable, such as C:\Windows\System32\cmd.exe for Command Prompt or windowspowershell.exe for PowerShell. If you are using Git Bash, you might reference git-bash.exe instead.
Defining the Working Directory
The most critical part of this configuration is the startingDirectory field. Add this key-value pair inside your new profile object. Set the value to the absolute path of the directory you want to access immediately. For example, "C:\\Projects\\WebApp". Note that backslashes in JSON strings must be escaped with another backslash, so \\ represents a single forward slash in the actual file system path. After saving the file, return to Windows Terminal and refresh the profile list by clicking the dropdown arrow. Your new profile will appear in the list. When selected, it will launch the specified shell and automatically execute a change directory command to your target folder, effectively giving you instant access to that workspace.
Integrating Environment Variables
For dynamic access, you can combine shortcuts with environment variables. If you have set up custom environment variables in your system, you can reference them in the startingDirectory path. This is helpful if your project folders are stored in user-specific locations that might vary across machines. For instance, using %USERPROFILE%\Documents\Dev ensures the path resolves correctly regardless of the username. This technique complements other terminal configurations, such as those discussed in our guide on using CD commands with custom environment variables, ensuring your terminal setup remains flexible and robust against path changes.
Troubleshooting Common Issues
If your shortcut does not work, verify that the path exists and that you have read permissions for that directory. JSON syntax errors are common; ensure all commas are placed correctly and quotes are balanced. A missing comma after a property value will cause the entire configuration to fail, resulting in Windows Terminal falling back to defaults. Additionally, check that the executable path in commandline is correct. If you recently installed a new shell like WSL or Git Bash, ensure the installation path matches what you entered. Broken shortcuts often result from typos in the guid or incorrect escaping of special characters in the file path. Regularly backing up your settings.json file can prevent loss of these custom configurations during updates.
Frequently Asked Questions
Can I use relative paths in the startingDirectory field?
No, Windows Terminal requires absolute paths for the startingDirectory field. Relative paths are not resolved correctly because the terminal does not know the base context for resolution. Always provide the full path starting from the drive letter, such as C:\Users\Name\Folder, to ensure reliable navigation.
How do I remove a custom terminal profile?
Open settings.json again and locate the profiles.list array. Find the object corresponding to your custom profile and delete the entire block enclosed in curly braces. Ensure you leave a comma after the previous entry if it is not the last one in the array. Save the file and restart the terminal to see the change.
Is it possible to pass arguments to the shell via this method?
Yes, you can include arguments in the commandline string. Append the desired flags or scripts after the executable path, separated by a space. For example, "cmd.exe /k cd C:\Projects" will start Command Prompt and immediately change the directory. This allows for complex initialization routines without needing separate batch files.
Why does my terminal open in the wrong directory?
This usually happens if another rule overrides your profile settings, or if the startingDirectory path contains a typo. Check for conflicting rules in global settings or other profiles. Also, verify that the directory still exists at that location; if the folder was moved or deleted, the terminal may fall back to the user's home directory.
Can I share my custom terminal settings with others?
You can copy the settings.json file to another computer, but you must ensure the paths and executables exist on the target machine. Differences in user names or installation directories may break the shortcuts. It is best to use environment variables or standard installation paths to maximize compatibility across different systems.