Skip to content

Commit 7cd48bc

Browse files
authored
startingDirectory path for WSL no longer requires prefix
1 parent be705cf commit 7cd48bc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

TerminalDocs/troubleshooting.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ If you click on the "settings" button in the dropdown, the Terminal will attempt
2020
2121
## Set your WSL distribution to start in the home `~` directory when launched
2222

23-
By default, the `startingDirectory` of a profile is `%USERPROFILE%` (`C:\Users\<YourUsername>`). This is a Windows path. For WSL, however, you may want to use the WSL home path instead. `startingDirectory` only accepts a Windows-style path, so setting it to start within a WSL distribution requires a prefix.
23+
By default, the `startingDirectory` of a profile is `%USERPROFILE%` (`C:\Users\<YourUsername>`). This is a Windows path. For WSL distributions, the file systems are now directly referenced, as of Windows Terminal [version 1.12.3472.0](https://github.com/microsoft/terminal/releases). You can use `/home/<Your Ubuntu Username>` to directly refer to your home folder. For example, the following setting will launch the "Ubuntu-20.04" distribution in its home file path:
2424

25-
Beginning in Windows 10 version 1903, the file systems of WSL distributions can be addressed using the `\\wsl$\` prefix. For any WSL distribution with the name `DistroName`, use `\\wsl$\DistroName` as a Windows path that points to the root of that distribution's file system.
25+
```json
26+
{
27+
"name": "Ubuntu-20.04",
28+
"commandline" : "wsl -d Ubuntu-20.04",
29+
"startingDirectory" : "/home/<Your Ubuntu Username>"
30+
}
31+
```
2632

27-
For example, the following setting will launch the "Ubuntu-18.04" distribution in its home file path:
33+
If you are using an earlier version of Windows Terminal, WSL may require using the `\\wsl$\` prefix when referring to a distribution's home path for the `startingDirectory` setting. For example, in earlier versions of Windows Terminal the following setting will launch the "Ubuntu-18.04" distribution in its home file path:
2834

2935
```json
3036
{

0 commit comments

Comments
 (0)