WSL startingDirectory Problem #1570

Closed
opened 2026-01-30 22:30:53 +00:00 by claunia · 2 comments
Owner

Originally created by @SJang1 on GitHub (Jun 9, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18912.1001]
Windows Terminal version (if applicable): commit 2da5b0b

Steps to reproduce

Build a terminal, open WSL profile.

  1. If setting(profiles.json) has startingDirectory, erase it.
    At commit 2da5b0b, there is no startingDirectory for WSL

  2. Set "startingDirectory" : "%USERPROFILE%"

Expected behavior

Both WSL starts at home directory as user. (/home/username/)

Actual behavior

  1. if there is no startingDirectory, WSL starts at /mnt/c/WINDOWS/System32
  2. if startingDirectory is %USERPROFILE%, WSL starts at /mnt/c/Users/Windows-Username
Originally created by @SJang1 on GitHub (Jun 9, 2019). <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18912.1001] Windows Terminal version (if applicable): commit 2da5b0b ``` # Steps to reproduce Build a terminal, open WSL profile. 1. If setting(profiles.json) has startingDirectory, erase it. **At commit 2da5b0b, there is no startingDirectory for WSL** 2. Set "startingDirectory" : "%USERPROFILE%" # Expected behavior Both WSL starts at home directory as user. (/home/username/) # Actual behavior 1. if there is no startingDirectory, WSL starts at **/mnt/c/WINDOWS/System32** 2. if startingDirectory is %USERPROFILE%, WSL starts at **/mnt/c/Users/Windows-Username**
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-30 22:30:53 +00:00
Author
Owner

@Summon528 commented on GitHub (Jun 9, 2019):

Duplicate of #592. At the meantime, set startingDirectory to //wsl$/Ubuntu/home/username

@Summon528 commented on GitHub (Jun 9, 2019): Duplicate of #592. At the meantime, set `startingDirectory` to `//wsl$/Ubuntu/home/username`
Author
Owner

@SJang1 commented on GitHub (Jun 10, 2019):

found that starting with "commandline" : "wsl.exe" make this problem, "commandline" : "ubuntu" does fine.

@SJang1 commented on GitHub (Jun 10, 2019): found that starting with `"commandline" : "wsl.exe"` make this problem, `"commandline" : "ubuntu"` does fine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1570