Exporting and importing WSL distributions

Exporting

In PowerShell:

wsl --export Ubuntu Ubuntu-01.tar

where Ubuntu is the distro name.

Importing

wsl --import UbuntuA C:\Users\dmitriano\wsl\UbuntuA Ubuntu-24.01.tar

probably the folder C:\Users\dmitriano\wsl\UbuntuA should exist.

The following files are created:

ext4.vhdx
shortcut.ico

Listing

wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
UbuntuA
Ubuntu-22.04

Running

wsl -d UbuntuA

1 Response to Exporting and importing WSL distributions

  1. dmitriano says:

    wsl –import Ubuntu-24.04a C:\dev\wsl\Ubuntu-24.04a .\Ubuntu-24.04.1.tar –version 2
    wsl –set-default Ubuntu-24.04a
    wsl –unregister Ubuntu-24.04

Leave a Reply to dmitriano Cancel reply

Your email address will not be published. Required fields are marked *