How to Export and Import Your Linux Systems on Windows 10

Share
  • June 27, 2019

Larry Ewing

Windows 10 now lets you export installed Linux environments, creating a TAR file of the root file system you can import on other PCs. Copy your configured systems between computers, share them with others, or just save a backup.

How This Works

The import and export features were added in the May 2019 Update—that’s Windows 10 version 1903. If you don’t have it installed yet, you won’t be able to use these command-line options.

All you need are two new options for the Windows wsl command: --export and --import . The --export option will export a Linux distribution’s root file system as a TAR file. The --import option lets you import a Linux distribution’s root file system as a TAR file.

RELATED: How to Install and Use the Linux Bash Shell on Windows 10

How to Export (Back Up) a Linux System

The wsl command is a Windows command—wsl.exe. You’ll need to run it in a PowerShell or Command Prompt environment, not in a Windows Subsystem for Linux environment. You can open one by right-clicking the Start button or pressing Windows+x and then clicking “Windows PowerShell.”

To list the distros installed, run the following command:

wsl --list

Now, use the following command to export a distro’s file system to a TAR file:

wsl --export distro_name file_name.tar

For example, to export out Ubuntu 18.04 system to a file named ubuntu.tar, we’d run:

wsl --export Ubuntu-18.04 ubuntu.tar

Exporting a WSL environment in PowerShell

Read the remaining 15 paragraphs

Source : How to Export and Import Your Linux Systems on Windows 10