How to Move Ubuntu WSL to Another Drive in Windows 11
This guide explains how to move your Ubuntu Linux environment to a different drive on your computer. If your main drive is getting full, this is a great way to save space.
Why do this? Moving your Linux files to a secondary drive helps free up space on your primary drive. It can also help you organize your files better if you have a faster or larger secondary storage drive.
What happens when done? Your Linux system will be safely moved to the new location. You will be able to access all your files and tools exactly as you did before, just from a different drive.
Windows Subsystem for Linux (WSL) lets you run Linux directly inside Windows. You do not need complex extra software to make this work.
Method 1: Using Windows Settings
This is the easiest way to move your files using the built-in Windows menus.
- Shut down WSL: Open your terminal and type this command:
wsl --shutdown - Open Settings: Click your Start button, go to Settings, and select Apps.

- Find your apps: Click on “Install apps” to see the list of programs on your computer.

- Select Linux: Find your Linux distribution (like Ubuntu) in the list.
- Move it: Click the three dots next to the app name and choose “Move.”

- Pick a drive: Select the drive where you want to move the files and click “Move.”

Method 2: Using the Command Line
This method is faster for power users. ⚠️ Admin privileges required: You must run your terminal as an administrator for these steps.
- Open Terminal: Right-click your start button and launch the Windows Terminal app as administrator as an administrator.
- List your distros: See what is installed by typing:
wsl --list --all - Shut down WSL: Stop the system with this command:
wsl --shutdown - Move the files: Use this command to move your files to a specific folder on another drive:
wsl --manage Ubuntu --move D:\WSLUbuntu
Method 3: Export and Import
You can also move your system by saving it as a file and moving that file to a new location. Windows Subsystem for Linux
Once you have your export file ready, use this command to bring it into the new drive:
wsl --import Ubuntu D:\WSLUbuntu C:\Ubuntu-export.tar
Summary
Moving your Linux setup is a simple task that helps you manage your storage space more effectively.
- Use the settings menu for a simple, visual way to move your files.
- Use the command line for a quick, direct method.
- Always shut down WSL first to ensure your files stay safe and do not get corrupted.
- Exporting and importing is a reliable way to migrate your system manually.
How do I move Ubuntu WSL to another drive in Windows 11?
Can I transfer my WSL distro without losing data?
What is the WSL --move command?
Is it necessary to shut down WSL before moving a distro?
What are the steps to export and import a WSL distro?
Was this guide helpful?
Leave a Reply Cancel reply