microsoft / microsoft/WSL

Install clean copy of distro under new name

Open
#11,266 0 comments 5 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

**Is your feature request related to a problem? Please describe.**
I want to easily install multiple copies of one distribution under different names. For example I'd like a DebianA for one project, and a DebianB for another project.

**Describe the solution you'd like**
I'd like for wsl --install to have an additional commandline argument that lets me specify a name. Something like:

```
wsl --install -d Debian --name DebianA
wsl --install -d Debian --name DebianB
```

**Describe alternatives you've considered**
There's a workaround here - https://fourco.nl/blogs/duplicate-a-linux-distro-under-wsl2/ - which boils down to:
```
wsl --install -d Debian
wsl --export Debian debian_stock.tar
wsl --import DebianA .\DebianA debian_stock.tar
wsl --import DebianB .\DebianB debian_stock.tar
```
But this is inconvenient if I want an automated way to create a *stock* copy. I'd have to delete my real 'Debian', install a fresh copy, and then carry out the export+import+import steps.

Contributor guide

Open the contributing guide

Research direction

Start with the existing `wsl --install` command and compare its behavior with the `--export` and `--import` workflow described in the issue. The change is done when `--install -d Debian --name DebianA` and a second differently named copy provide automated clean installations without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.