2

I installed the WSL Bash on Windows 10 so it can act as my terminal in VScode, but the default directory is ~/home/USERNAME

I would like it to be /mnt/c/Users/USERNAME (so on my windows domain side)

I've looked at so many different angles on how to change the default from adding a command to .bashrc that manually changes the directory on startup, to going to the registry editor and trying to change the default directory for CMD, (turns out even that's a challenge as the file I needed to alter doesn't even exist but that's a problem for another day)

Any ideas on how I can change the WSL ubuntu18.04 terminal so that the default directory on startup is different?

muru
  • 197,895
  • 55
  • 485
  • 740
ZaneK
  • 121

1 Answers1

0

All of this is done in VS Code.

First, make sure to install the Remote - WSL VS Code extension.

Open user preferences: File -> Preferences -> Settings

In "Search settings" type cwd

In the block labeled Terminal > Integrated: Cwd enter /mnt/c/Users/[your windows user name]

Close settings and reopen the terminal and the starting directory should now be your windows user directory.