Use WSL’s built-in wsl --export and wsl --import commands to save and restore a Linux distribution. Export creates a tar archive by default; for a WSL 2 distribution, you can also export a VHDX. Keep the original distribution until you have confirmed the backup and tested the restored copy: wsl --unregister permanently deletes the distribution’s data, settings, and software.
Before you start: identify the distribution and choose a destination
Open PowerShell or Command Prompt and list your installed distributions:
As an Amazon Associate I earn from qualifying purchases.
wsl --list --verbose
Use the exact distribution name shown in the list in the commands below. The output also identifies whether each distribution uses WSL 1 or WSL 2, which matters because VHDX export is available only for WSL 2. Choose a destination with enough free space and create its parent folder first; for example, make sure D:Backups exists before exporting to it.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsYou can save the export on another drive or removable storage and copy it to another computer. Microsoft notes that a full export-and-import transfer can require substantial disk space. If space is limited and you only need selected files, Microsoft’s WSL FAQ describes transferring files and reinstalling packages as an alternative; that is not a complete distribution backup.
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Export a backup
Option 1: Create a tar archive
Run the following in PowerShell or Command Prompt, replacing Ubuntu with your distribution’s exact name and adjusting the destination as needed:
wsl --export Ubuntu D:BackupsUbuntu.tar
wsl --export creates a snapshot file and uses tar format by default. Microsoft documents the syntax as wsl --export <Distribution Name> <FileName>. Keep the resulting archive in a safe location; you can copy it to another machine before importing it there.
Option 2: Export a WSL 2 distribution as VHDX
For a WSL 2 distribution, you can export its virtual disk instead:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
wsl --export Ubuntu D:BackupsUbuntu.vhdx --vhd
Microsoft’s command reference documents the --vhd option, while its FAQ also shows the equivalent format selection as --format vhd. VHDX export requires WSL 2 and can use substantial disk space. Use this option when you want a disk-based backup or plan to register the VHDX directly at its final location.
Restore a tar archive
Import the archive with a registered distribution name and an installation directory. This example explicitly selects WSL 2:
wsl --import Ubuntu-Restored D:WSLUbuntu-Restored D:BackupsUbuntu.tar --version 2
The arguments are the new distribution name, its installation location, and the archive path. Use --version 1 or --version 2 to select the intended WSL version; include the flag rather than relying on a default when the version matters. You can choose another registered name or installation directory, provided the destination is suitable and available.
Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Restore a VHDX backup
Import the VHDX into an installation directory
Use --vhd when importing a VHDX backup:
wsl --import Ubuntu-Restored D:WSLUbuntu-Restored D:BackupsUbuntu.vhdx --vhd
Register an existing VHDX in place
If the VHDX is already at the location where you intend to keep it, register it directly with:
wsl --import-in-place Ubuntu-Restored D:BackupsUbuntu.vhdx
The virtual hard disk used with --import-in-place must use the ext4 filesystem. WSL 2 distributions use ext4 virtual disks stored as VHDX files, as described in Microsoft’s WSL disk-space guidance. Because an in-place import registers the disk at its current path, leave the file in its intended permanent location.
Move a distribution to another drive
For a move, export the WSL 2 distribution as VHDX, verify the export, unregister the original, and then import the VHDX in place from the new drive. A typical sequence is:
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
-
Export the distribution:
wsl --export Ubuntu D:BackupsUbuntu.vhdx --vhd. -
Check that the export completed and the VHDX exists at the destination. Keep an independent copy if you can.
Free tools Windows power users keep installed
One-click scans. No signup required.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Only when you are satisfied the backup is intact, unregister the original:
wsl --unregister Ubuntu.Best Value
SaleUnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0- [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
- 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
- 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
- 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
- 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
-
Move or copy the VHDX to its intended permanent location, then register it there:
wsl --import-in-place Ubuntu D:WSLUbuntu.vhdx. -
Start the imported distribution and confirm that it is usable before removing any remaining backup copy.
Microsoft warns that, once a distribution is unregistered, all data, settings, and software associated with it are permanently lost. Do not run the unregister command as a way to test a backup, and do not delete your only export until you have confirmed the restored distribution works.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallChoose the format that fits the job
| Need | Documented choice | Constraint |
|---|---|---|
| Keep a conventional archive or restore from a tar file | Export to tar, then use wsl --import. |
Import requires a distribution name and installation location; specify the WSL version if it matters. |
| Save or transfer a WSL 2 virtual disk | Export to VHDX, then import with --vhd. |
VHD export and import require WSL 2; the full transfer can require substantial disk space. |
| Register a VHDX from its final location | Use wsl --import-in-place. |
The VHDX must use ext4 and should remain at the registered path. |
| Transfer only selected files when storage is limited | Use file transfer and reinstall packages, as described in Microsoft’s WSL FAQ. | This does not create a complete distribution export. |
Keep the backup separate from the original
For a backup you may need later, retain the exported tar or VHDX somewhere separate from the distribution’s installation files. For a transfer, copy the export to the destination computer and import it there using the matching method above. Before deleting an original or backup, verify that the export completed and that the restored distribution starts and contains the data you need.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




