How to clone WSL distro on Windows 11

It's possible clone a Linux distro on WSL, you only need to use the export and import commands, and here's how on Windows 11.

Clone WSL distro
Clone WSL distro

The Windows Subsystem for Linux (WSL) allows you to clone a Linux distribution, and in this guide, you will learn the steps to complete the process successfully.

Although the WSL platform doesn’t include a clone option, you can use the export and import commands to make a copy of an existing Linux distribution on Windows 11. Usually, you want to download the distributions from the Microsoft Store, but sometimes, you may need to test changes without affecting the original setup, which you may spend hours configuring. 

Whatever the situation might be, you can use the wsl.exe tool with the --export option to export and the --import option to restore a distribution with a different name, thus cloning the setup. However, you should be aware that when using this method, the clone distribution (for example, Ubuntu, CentOS, Debian, Mint, etc.) will lose its integration with the Start menu, and it’ll no longer appear as an item in the “Installed apps” settings.

This guide will teach you the steps to clone a Linux distro on Windows 11.

Clone Linux distro on WSL

To clone a WSL Linux distribution on Windows 11, use these steps:

  1. Open Start on Windows 11.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to determine the available Linux distros and press Enter:

    wsl --list
  4. Type the following command to export the WSL distro to clone and press Enter:

    wsl --export DISTRO-NAME PATH\FILE-NAME.tar

    In the command, change “DISTRO-NAME” and “PATH\FILE-NAME.tar” with the information for your Linux distro. If you don’t specify a path, the backup will be stored in the root of “C:”. For instance, this command backs up (exports) the “Ubuntu” distro:

    wsl --export Ubuntu ubuntu-backup.tar

    Create Linux distro clone

  5. Type the following command to import the WSL distro clone and press Enter:

    wsl --import DISTRO-CLONE-NAME INSTALL-LOCATION PATH\FILE-NAME.tar

    In the command, change “DISTRO-CLONE-NAME” with the name you want to clone to appear on WSL. Also, change “INSTALL-LOCATION” and “PATHFILE-NAME.tar” with the information for your distribution. For instance, this command clones the distro as “Ubuntu-Cloned:”

    wsl --import Ubuntu-Cloned C:\Users\USERNAME\Distros C:\ubuntu-backup.tar

    WSL import clone distro

  6. Type the following command to confirm the distro has been cloned and press Enter:

    wsl --list
  7. Type the following command to launch the clone on the Windows Subsystem for Linux and press Enter:

    wsl --distribution NAME-CLONED-DISTRO

Once you complete the steps, the distribution clone will import to your destination. The only downside with this process is that the clone won’t have the same integration as those distros installed through the Microsoft Store. For instance, once the distro is imported on the computer, it won’t register in the Start menu or appear as an app in the “Installed apps” settings page.

If you want to launch the newly cloned distro, you’ll need to run the wsl --distribution DISTRO-CLONE-NAME command. Also, if you plan to uninstall the distribution, you must use the wsl --unregister DISTRO-CLONE-NAME command.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 14 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me.