There are a few command-line tools available on your Windows 10 computer and in most cases, the default directory for the tool is the user’s profile location. However, that can be easily changed.
Windows 10 now has a new Windows Terminal application that is a modern command-line experience to run Linux commands as well as Command Prompt and PowerShell. It also allows users to change the default directory.
In this step-by-step tutorial, we will show you how to change the default directory on your Windows 10 computer for the command-line tools using the Settings UI of Windows Terminal.
Change starting directory in Windows Terminal
Step 1: First of all, open Windows Terminal on your computer.
Step 2: Now, open the Settings UI. For this, you can press the shortcut keys Shift + Ctrl + , (comma) on your keyboard.
Step 3: Click on the Windows PowerShell, Command Prompt, or WSL distro, based on the console you want to configure.
Step 4: In the “General” tab, under the “Starting Directory” section, click on the “Browse” button.
Step 5: Now select the location that you want to set as a starting directory and after selecting the directory or folder, just click the “Ok” button.
Once you have followed all these steps, you will notice that when you open the command-line tool on your computer, the starting directory has been changed to whatever you have selected in Step 5 mentioned above.