Deploying WSL2 on Windows 11 and Moving Its Install Location
·(edited)· / , · reads· likes0
This article was last modified on . Some content may be outdated. Feel free to ask the author if you have questions.
AI TranslationSimplified ChineseEnglish
Key Insights
This guide explains how to install WSL2 on Windows, install the Ubuntu-24.04 subsystem, and migrate it to another drive. It starts by opening PowerShell, running the required installation commands, and restarting the computer to apply changes. Then it shows how to view available Linux distributions, select Ubuntu-24.04, install it, set up a username and password, and enter the shell successfully. Finally, it describes moving Ubuntu to a new disk by creating a folder such as E:\WSL\Ubuntu-24.04, exporting the existing Ubuntu instance, unregistering the original Ubuntu-24.04, and re-importing it to the new location. A related WSL2 and Ubuntu installation guide is provided as a reference.
Install WSL2
Run the install command
OpenPowershell, then run the following two commands
Install WSL2
Run the install command
OpenPowershell, then run the following two commands
Restart your PC
Apply the changes
Install the distro you want
List all available distros
For this example, we'll go withUbuntu-24.04
Install Ubuntu 24.04
Set your username and password
You're in the shell
Move Ubuntu to a new drive
Create a folder on the E: drive
In this example, we'll useE:\WSL\Ubuntu-24.04as the path
Run the export command
Unregister the existing Ubuntu 24.04
Import Ubuntu 24.04 again
References