Suggestion: To use `--name <InstanceName>` as the folder name for new instances
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
**Current behavior**
To create a WSL 2 instance with a specific name and folder location, I must use both `--name` and `--location`.
Example command:
```powershell
wsl --install Ubuntu-24.04 --name Ubuntu-24.04 --location D:\WSL\Ubuntu-24.04
```
If `.wslconfig` specifies a default installation path via `distributionInstallPath`:
```ini
[general]
distributionInstallPath=D:\\WSL
```
Then running:
```
wsl --install Ubuntu-24.04 --name Ubuntu-24.04
```
creates the instance in a GUID-based folder, e.g.:
```powershell
D:\WSL\{d7c75f51-5ebb-4d83-bafe-95e5a8333e9d}
```
**Problem**
The folder name does not reflect the instance name. This makes it harder to manage instances and requires always specifying `--location` explicitly.
**Proposed improvement**
Automatically use the value of `--name ` as the folder name when `distributionInstallPath` is defined in `.wslconfig`.
Example result:
```powershell
D:\WSL\Ubuntu-24.04
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the `wsl --install` handling and the `.wslconfig` `distributionInstallPath` setting described in the issue. Trace how the instance name and default installation path are combined, then verify that a named instance uses a matching folder under the configured path without an explicit `--location`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100