Introduction
If your WSL Linux distro (ext4.vhdx) is filling up your C: drive in Windows 11, you can move it to another drive with a staged VHD export, verification, and –import-in-place workflow—or in one step with wsl –manage –move if your installed WSL build lists –move in wsl –help.
A WSL 2 distribution stores its Linux files in a virtual disk, usually named ext4.vhdx. As you install packages and create files in Ubuntu or another distro, that disk can grow on C:. Moving the distribution places its virtual disk on another drive; it does not automatically shrink an oversized disk. Microsoft explains the difference between WSL 1 and WSL 2 in its WSL version comparison.
Identify Your Target Distribution
Find the distribution you want to move. Copy its exact NAME, including any version suffix, and confirm its VERSION is 2. For example, Ubuntu-24.04 and Ubuntu are different names. An asterisk marks the current default distribution; it is not part of the name.
Check whether wsl –help lists –export (–vhd or –format vhd), –import-in-place, and –manage –move . Microsoft’s WSL export and import workflow lets you verify a separate backup VHD on the destination drive before removing the original registration, while –manage –move (when listed by wsl –help on your installed build) relocates the distribution’s ext4.vhdx into an existing destination directory in one step.
Expected result: You know the exact distribution name, have confirmed VERSION 2, and can see which commands your WSL installation supports. If wsl –version or a needed option is unrecognized, see Tips and Troubleshooting before continuing.
Prepare the Destination Drive
Expected result: The destination folder opens, and the drive has room for the export. A local drive with adequate free space is the straightforward choice; do not count on an unavailable removable drive or network location for a distro you need every day.
Relocate Using WSL Manage Move
If wsl –help on your PC lists –manage –move , you can relocate the distribution into the existing destination folder you created in Step 2 (D:WSLDistrosUbuntu) after stopping WSL.
Here the argument is the destination directory (D:WSLDistrosUbuntu, created in Step 2), and WSL moves the distribution’s ext4.vhdx file into that folder automatically. Wait for the command to finish, then jump to Step 6 to launch the distro and confirm that C: space was recovered. Because Microsoft’s core WSL command reference and FAQ focus on export/import and –import-in-place, follow Steps 3–5 below if you want a staged workflow that verifies an exported ext4.vhdx file and hash on D: before removing the C: registration, or if your installed WSL build does not list –move.
(Note: Microsoft’s basic-commands reference documents –vhd, while newer WSL releases and the WSL FAQ also accept –format vhd: wsl –export “Ubuntu” “D:WSLDistrosUbuntuext4.vhdx” –format vhd.)
Export the VHD File
Wait until PowerShell returns to its prompt. Match whichever flag (–vhd or –format vhd) appears in wsl –help on your PC. If your WSL build predates VHD export support entirely, update WSL first (see Fix #1) or use the TAR workflow in the Configuration section instead. Do not unregister the distro yet.
Expected result: The export finishes without an error, and D:WSLDistrosUbuntuext4.vhdx exists. Exporting creates a copy; your original distro is still registered on C:.
Verify the Backup
Confirm the file name, location, and a size that makes sense for your distro. An empty or unexpectedly tiny file is a reason to stop and investigate.
The Hash values should match. This checks that the copied files have the same contents. It does not prove that a VHD will import and boot, so keep the separate copy until you have launched and checked the moved distro.
Unregister the Original Distro
Safety checkpoint: Continue only if the export command completed without an error, Get-Item finds a plausible VHD file, and any backup copy you made matches. wsl –unregister deletes the original distribution’s Linux files from its current registration. Microsoft’s WSL installation documentation warns that unregistering a distribution permanently removes its data.
This is the destructive step. If the name is wrong, stop and check wsl –list –verbose again before running it.
Import the VHD from the New Location
Do not move or delete that VHD afterward: it is now the distribution’s working disk.
Expected result: WSL accepts the import without an error. The original registration has been removed, and the distribution is registered from the VHD on D:.
Launch and Verify the Moved Distro
Confirm your distro appears under its expected name with VERSION 2.
Check that familiar files and installed tools are present. In the Linux shell, these basic checks show your current user and home directory.
Expected result: The distro launches with your files, its VHD remains on D:, and C: shows more available space once the original distribution’s storage has been removed. Keep your separate backup until you have used the imported distro long enough to trust it.
Configuration and Troubleshooting
The VHD method keeps the exported virtual disk in place. That makes the destination path important: D:WSLDistrosUbuntuext4.vhdx is the live disk after wsl –import-in-place.
If VHD export or import in place is unavailable on your WSL installation, Microsoft also documents a TAR export and import workflow. A TAR file is an archive used to create a new distro installation folder. Use a separate export folder so the archive does not sit inside the installation folder.
Check that the export completed and that the TAR file has a plausible size. If you can, keep a separate copy. Only then unregister and import.
The TAR archive is a backup artifact, while the imported distro uses files in D:WSLDistrosUbuntu. Check your Linux files and user after import before deleting the TAR. See Microsoft’s WSL FAQ for the export and import commands.
Replace your_username with the folder name from /home, exit the shell, run wsl –terminate “Ubuntu” in PowerShell, and launch the distro again so whoami returns your normal account.
The staged –export –vhd and –import-in-place workflow lets you verify a backup ext4.vhdx file on your destination drive before removing the C: registration, while wsl –manage –move provides a one-command folder relocation when listed by wsl –help on your installed build. If your WSL build does not support VHD options, update WSL first or use the TAR export/import workflow and set [user] default= in /etc/wsl.conf if needed to complete the migration of your WSL Linux distro.

































