Use WSL’s built-in wsl --export and wsl --import commands to back up 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 backup until you have restored the distribution and confirmed it works—wsl --unregister permanently deletes the original distribution’s data.
Before you begin
Run the commands below in PowerShell or Command Prompt. First, check the distribution’s registered name and WSL version:
wsl --list --verbose
Use the name exactly as it appears in the list. Choose a backup destination with enough free space, and create its parent folder first. A removable drive can hold the export if you want to keep it separate from the Windows installation or carry it to another computer. Microsoft notes that a full export-and-import transfer can require substantial disk space; when space is limited, its WSL FAQ describes transferring selected files and reinstalling packages as an alternative, not a complete distribution backup.
Back up the distribution
Export a tar archive
The default export format is tar. Replace Ubuntu with your distribution’s exact name and adjust the destination path:
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
wsl --export Ubuntu D:BackupsUbuntu.tar
This creates a snapshot archive at the specified path. The export command and its default format are documented in Microsoft’s WSL basic commands.
Export a VHDX (WSL 2 only)
If the distribution uses WSL 2, you can export its virtual disk instead:
wsl --export Ubuntu D:BackupsUbuntu.vhdx --vhd
VHDX export is supported only for WSL 2. Microsoft’s FAQ also documents the --format vhd form; the command reference uses --vhd. Either way, ensure the destination has room for the export.
Check the backup before relying on it
Wait for the export command to finish, then confirm the file exists at the destination and has a plausible nonzero size. For a backup you cannot afford to lose, retain a separate copy until a restore has been tested. Do not unregister or remove the source distribution as part of making a backup.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Restore a tar archive
Import the archive with a new registered name and a directory where WSL can store the distribution:
wsl --import Ubuntu-Restored D:WSLUbuntu-Restored D:BackupsUbuntu.tar --version 2
The arguments are the registered distribution name, installation location, and archive path. The example explicitly selects WSL 2; use --version 1 if that is the intended version, or choose the appropriate version for your setup. The target directory must be suitable for WSL to use as the distribution’s installation location.
After import, check that it is registered and start it:
wsl --list --verbose
wsl -d Ubuntu-Restored
Use the registered name you chose if it differs from the example. Check that your expected files and applications are present before treating the restore as successful.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Restore a VHDX backup
Import the VHDX into an installation location
To import a VHDX backup under a chosen name and location, use:
wsl --import Ubuntu-Restored D:WSLUbuntu-Restored D:BackupsUbuntu.vhdx --vhd
This is the VHD import form shown in Microsoft’s WSL FAQ. VHD export and import are WSL 2 options.
Register a VHDX at its existing location
If the VHDX is already in the directory where you intend to keep it, register it in place:
wsl --import-in-place Ubuntu-Restored D:BackupsUbuntu.vhdx
The in-place import requires an ext4 filesystem. Microsoft’s WSL disk-space guidance describes WSL 2 distributions as using ext4 virtual hard disks stored as VHDX files. Because the distribution is registered from the disk’s current path, leave the file there if you want WSL to continue using it.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Move a distribution to another drive
For a move, first export a WSL 2 distribution as VHDX. Only remove the original after confirming the export completed and the backup file is present. Then unregister the original and import the VHDX in place from its permanent location on the destination drive:
-
Export the distribution:
wsl --export Ubuntu D:BackupsUbuntu.vhdx --vhd. -
Verify that the export completed and the VHDX is present. Keep another copy if you need protection against a failed move.
-
After verification, unregister the original:
wsl --unregister Ubuntu.Recommended: Fix Windows Errors and Clear Junk Files in Minutes - Free Scan →Recommended: Update Every Outdated Driver on Your PC in One Scan - Free →Recommended: PC Feels Slow? A Free Scan Shows What's Dragging Windows Down →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Best Value
SaleAnker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
-
Move or copy the VHDX to the desired permanent location, then register it:
wsl --import-in-place Ubuntu D:WSLUbuntuUbuntu.vhdx. -
Check the registered distribution with
wsl --list --verbose, start it, and confirm its contents are usable.
Microsoft warns that unregistering permanently removes all data, settings, and software associated with that distribution. Do not run the unregister command before verifying the export; keep an independent copy until the moved distribution has been checked.
Quick Recap
Choose the right format
| Need | Documented option | Constraint |
|---|---|---|
| A conventional archive for backup or restore | Export to tar, then use wsl --import |
Import requires a registered name and installation location; specify the intended WSL version. |
| A WSL 2 virtual-disk backup or transfer | Export to VHDX, then import with --vhd |
VHD export and import require WSL 2. |
| Register a VHDX directly from its final location | wsl --import-in-place |
The disk must use ext4; keep it at the path from which it is registered. |
| Transfer only selected files when storage is limited | Transfer files in Linux and reinstall packages, as described in Microsoft’s WSL FAQ | This is not a complete export of the distribution. |
Common mistakes to avoid
- Using the wrong distribution name: Check
wsl --list --verbosebefore exporting or unregistering. - Importing to a folder that does not exist: Create the intended parent directory before running the import command.
- Assuming VHDX works with WSL 1: VHDX export and import are for WSL 2; use tar if you need the archive route.
- Unregistering before verifying the export: Unregistering is destructive, not a way to safely test a backup.
- Moving an in-place VHDX after registration: Keep it at the registered path or register it again from its new location.
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.

