When you launch a Linux distro in WSL (Windows Subsystem for Linux), it by default, starts in the C drive or current working directory of the process. i.e., C:\Windows\System32
. But, you can customize this starting location. Using the terminal settings, you can easily change the default starting directory for any Linux distro in WSL. For instance, I’ve configured my WSL Ubuntu to open directly in the user’s home directory.
In this quick and straightforward tutorial, I’ll guide you through the steps to set your preferred starting directory for WSL. Let’s get started.
Good to know: How to change default Linux distro in WSL
Change Default Starting Directory for a Linux Distro in WSL
- Right-click the “Windows” icon on the taskbar.
- Select “Terminal“.
- Click the down arrow on the title bar.
- Select “Settings“.
- Select the Linux distro on the left sidebar.
- Click the “Starting directory” option.
- Click “Browse“.
- Select the directory of your choice and click “Select Folder“.
- Click “Save“.
- With that, your Linux distro starts in the selected custom directory.
Detailed Steps (With Screenshots)
First, open the Terminal application. To do that, right-click the “Windows” icon on the taskbar or press the “Windows key + X” shortcut and select “Terminal”.

In the Terminal window, click the down arrow icon on the title bar and select the “Settings” option. Alternatively, press the “Ctrl + ,” shortcut. This opens the Settings tab.

Once the Settings tab opens, select the Linux distro of your choice from the sidebar. Here I’m selecting the “Ubuntu” distro. Next, click the “Starting directory” option on the right panel.

Next, click the “Browse” button.
Note: If you want to set your Linux home directory (~) as the starting directory, type %USERPROFILE%
in the blank directory.

Now, select the folder you want to set as the default directory and select the “Select Folder” button.

Finally, click the “Save” button and you are done.

From now on, whenever you open the WSL terminal, it starts in the directory you chose. For instance, I chose to start in the home directory, so it starts with that. If you want to check, run the pwd
command.

That is all. It is that simple to change the starting directory in WSL. If you have any questions or need help, comment below. I’ll be happy to assist.