Page cover

9.3. How to export/import WSL distribution?

Step 1: Export Your WSL Environment

1.1. List installed distributions (on the source PC):

wsl --list --verbose

Example output:

NAME      STATE           VERSION
Ubuntu    Running         2

1.2. Export the distribution to a .tar file (e.g., ubuntu_gasflow.tar):

wsl --export Ubuntu C:\path\to\ubuntu_gasflow.tar

1.3. Copy the .tar file to the target PC (via USB, cloud storage, etc.).

Step 2: Import on the Target PC

2.1. Import the distribution (replace Ubuntu_gasflow with your preferred name):

wsl --import Ubuntu C:\path\to\install\folder C:\path\to\ubuntu_gasflow.tar
  • C:\path\to\install\folder: Where WSL files will be stored (e.g., C:\WSL\Ubuntu_gasflow).

2.2. Set default user (if your username is gasflowuser):

Create a %USERPROFILE%\\.wslconfig file with:

[user]
default=gasflowuser

2.3. Launch the environment:

wsl -d Ubuntu_gasflow

Last updated

Was this helpful?