Set default WSL path to distro $HOME #4583

Open
opened 2026-01-30 23:51:13 +00:00 by claunia · 0 comments
Owner

Originally created by @mveril on GitHub (Oct 22, 2019).

Set default WSL path to distro $HOME

The default path for WSL distros is currently the Windows user path (%USERPROFILE%) but it's may be better to set it to the distro $HOME.

Proposed technical implementation details (optional)

I don't know if it's possible, but ideally in the WslDistroGenerator.cpp the command line should be conditionally set to "wsl.exe -d " + distName if startingDirectory is set in profile.json, "wsl.exe ~ -d " + distName otherwise.
Another possibility is to add a boolean setting UseWSLHome on the wsl profile.json
Thank you.

Originally created by @mveril on GitHub (Oct 22, 2019). # Set default WSL path to distro $HOME The default path for WSL distros is currently the Windows user path (`%USERPROFILE%`) but it's may be better to set it to the distro `$HOME`. # Proposed technical implementation details (optional) I don't know if it's possible, but ideally in the `WslDistroGenerator.cpp` the command line should be conditionally set to `"wsl.exe -d " + distName` if `startingDirectory` is set in `profile.json`, `"wsl.exe ~ -d " + distName` otherwise. Another possibility is to add a boolean setting `UseWSLHome` on the wsl `profile.json` Thank you.
claunia added the Issue-FeatureArea-SettingsResolution-DuplicateProduct-Terminal labels 2026-01-30 23:51:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4583