Ici is comment have several copies du same distribution:
-
Installez le base distribution depuis le Windows Store or using:
wsl --install -d <distribution name>
-
Log invers le environment and modify as needed, ensuite exit it
-
Export the environment avec the following command:
wsl --export <distribution name> <export file name>
-
Créez un nouveau instance du base environment by importing the
.tar fichier:
wsl --import <new distribution name> <install location> <export file name>
-
Vous pouvez maintenant ouvrez le nouveau environment using:
wsl -d <new distribution name>
-
In Windows 11, vous pouvez browse the fichier-système of
distributions in Explorer via Desktop > Linux
-
The nouveau distribution will have root as the par défaut utilisateur.
To login as another utilisateur, either use the -u <username> flag
or créer/modify a wsl.conf fichier in /etc répertoire inside
the environment, avec the following section:
[user]
default=<username>
For more information avec captures d'écran see the article
Setting up multiple WSL distribution instances.