From 7cd48bcb462a754b690e28586b551f770bd1f35c Mon Sep 17 00:00:00 2001 From: Matt Wojciakowski Date: Fri, 7 Jan 2022 16:19:27 -0800 Subject: [PATCH] startingDirectory path for WSL no longer requires prefix --- TerminalDocs/troubleshooting.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/TerminalDocs/troubleshooting.md b/TerminalDocs/troubleshooting.md index 109ddf24..996c7fc8 100644 --- a/TerminalDocs/troubleshooting.md +++ b/TerminalDocs/troubleshooting.md @@ -20,11 +20,17 @@ If you click on the "settings" button in the dropdown, the Terminal will attempt ## Set your WSL distribution to start in the home `~` directory when launched -By default, the `startingDirectory` of a profile is `%USERPROFILE%` (`C:\Users\`). 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. +By default, the `startingDirectory` of a profile is `%USERPROFILE%` (`C:\Users\`). 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/` to directly refer to your home folder. For example, the following setting will launch the "Ubuntu-20.04" distribution in its home file path: -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. +```json +{ + "name": "Ubuntu-20.04", + "commandline" : "wsl -d Ubuntu-20.04", + "startingDirectory" : "/home/" +} +``` -For example, the following setting will launch the "Ubuntu-18.04" distribution in its home file path: +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: ```json {