October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Move a WSL Distribution to Another Drive

Export a WSL distribution to a VHDX on the destination drive, verify the backup, unregister the old copy, and import the disk at its new path.

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.

To move an existing WSL distribution on the same Windows PC, export it as a VHDX to the destination drive, unregister the old distribution, then import the VHDX in place. Do not unregister the old copy until the export has finished and you have confirmed the file exists: unregistering permanently deletes that distribution’s data, settings, and installed software.

Move a WSL distribution to another drive

Microsoft’s documented move procedure uses PowerShell and a VHDX file. Replace Ubuntu with the registered name of your distribution and use a destination path that already exists or that you create first. The example stores the VHDX in D:WSLDistrosUbuntu.

As an Amazon Associate I earn from qualifying purchases.

  1. In PowerShell, export the distribution to the destination drive:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    wsl --export Ubuntu D:WSLDistrosUbuntuext4.vhdx --format vhd
  2. Wait for the export command to complete. Confirm that D:WSLDistrosUbuntuext4.vhdx exists before continuing. This file is the backup for the next step.

    #1 Best Overall
    Sale
    Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
    • 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.
  3. Unregister the old distribution:

    wsl --unregister Ubuntu
  4. Register the VHDX at its new path:

    wsl --import-in-place Ubuntu D:WSLDistrosUbuntuext4.vhdx
  5. Start the distribution and check that your expected files and software are available. Keep the exported VHDX until you have verified the imported distribution.

This is Microsoft’s documented same-machine procedure. Its WSL FAQ says the export and import commands are available in Windows version 1809 and later. The VHD export and import options are documented for WSL 2; --import-in-place requires an ext4-formatted VHDX. If you are unsure which WSL version is installed, check with wsl --version before relying on the VHD workflow. See Microsoft’s WSL command reference for command details.

Rank #2
Sale
Samsung T7 Portable SSD 1TB Titan Gray, USB 3.2 Gen 2, Up to 1,050MB/s | Reliable External Solid State Drive Storage for Gaming, Students, Professionals (MU-PC1T0T/AM)
  • MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
  • SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
  • ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
  • ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
  • HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³

Choose between a VHDX move and a tar import

A VHDX import-in-place is the documented option for moving a complete WSL 2 distribution’s virtual disk to a new path. A tar archive is another way to import a distribution at a chosen installation location, but it uses a different command and workflow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Approach Export format Import command Important distinction
Move a VHDX in place VHD/VHDX, created with wsl --export ... --format vhd wsl --import-in-place <Name> <VHDX path> For WSL 2; the VHDX must use ext4. Microsoft uses this method in its move FAQ.
Import a tar archive to a location Tar is the default format for wsl --export wsl --import <Name> <InstallLocation> <TarFile> Specify the install directory and archive path. The command reference also documents the --vhd option for WSL 2 imports.

For example, a tar-based export and import can use these commands:

Rank #3
Sale
Samsung T7 Portable SSD 2TB Titan Gray, USB 3.2 Gen 2, Up to 1,050MB/s
  • MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
  • SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
  • ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
  • ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
  • HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³
wsl --export Ubuntu D:WSLDistrosUbuntu.tar
wsl --import Ubuntu D:WSLDistrosUbuntu D:WSLDistrosUbuntu.tar

The export and import syntax and format distinctions are documented in Microsoft’s basic WSL commands reference. A full VHD transfer can require considerable disk space, so make sure the target drive has room for the exported file.

Understand the unregister data-loss risk

wsl --unregister removes the existing distribution registration and its contents. Microsoft warns that “Once unregistered, all data, settings, and software associated with that distribution will be permanently lost.” If the export failed, is missing, or is saved somewhere you cannot access, unregistering can leave you without the original environment. Do not delete the VHDX after import until you have checked the new distribution.

Rank #4
Lexar ES3 1TB Portable SSD Silver, USB 3.2 Gen 2 up to 1050MB/s
  • Note: Magsafe is not available in this version
  • High-speed Data Transfer: Lexar external SSD ES3 supports USB 3.2 Gen 2 up to 1050MB/s read and 1000MB/s write to transfer files fast for more efficient work. (Performance may be lower if not supporting USB 3.2 Gen 2 on Mac and other systems)
  • Wide Compatibility: Lexar Portable SSD ES3 compatibility with iPhone 17 series (Not supported on iPhone 14 and older models), Android mobile devices, laptops, cameras, Xbox X|S, PS4, PS5, gaming console, and more
  • On The Go: Lexar external solid state drive ES3's thin, stylish, and durable design, weighs 42g and is only 10.5mm thick, making it smaller than a card and easily fits in your pocket. It comes with a Type-C cable for plug-and-play convenience
  • Data Safety First: Lexar SSD ES3 includes Lexar DataShieldTM 256-bit AES encryption software to protect files
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use the right command for an existing distribution

The --location option in wsl --install selects where a newly installed distribution goes; it is not Microsoft’s documented relocation command for an already-installed distro. For an existing distro, use the export-and-import procedure that matches your intended format.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Similarly, moving files into a Windows drive mounted inside Linux does not relocate the registered distribution’s virtual disk. Windows drives mount under /mnt by default—for example, the Windows C: drive appears at /mnt/c/. Changing a mount path affects how Linux accesses a Windows drive, not where WSL stores the distribution. Microsoft explains these mount settings in its advanced WSL configuration reference.

Best Value
Sandisk 2TB Extreme Portable SSD, Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware, External Solid State Drive, SDSSDE61-2T00-G25
  • Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
  • Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
  • Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
  • Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
  • Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C

When a full-distro move is not practical

If you are transferring selected files or rebuilding a distro on another machine with limited disk space, Microsoft describes using tar archives of selected directories and exporting an apt package list for reinstalling packages. Those techniques transfer chosen files and package information; they should not be treated as a complete copy of every aspect of the original distribution.

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.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.