Windows

How to Move Ubuntu WSL to Another Drive in Windows 11

Richard
Written by
Richard
Dec 2, 2024 Updated Apr 17, 2026 3 min read

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.

  1. Shut down WSL: Open your terminal and type this command:

    wsl --shutdown
  2. Open Settings: Click your Start button, go to Settings, and select Apps.
  3. Windows Settings menu showing installed apps to move Ubuntu WSL
  4. Find your apps: Click on “Install apps” to see the list of programs on your computer.
  5. Windows 11 installed apps
  6. Select Linux: Find your Linux distribution (like Ubuntu) in the list.
  7. Move it: Click the three dots next to the app name and choose “Move.”
  8. WSL distro move drive
  9. Pick a drive: Select the drive where you want to move the files and click “Move.”
  10. WSL distro move drive complete

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.

  1. Open Terminal: Right-click your start button and launch the Windows Terminal app as administrator as an administrator.
  2. List your distros: See what is installed by typing:

    wsl --list --all
  3. Shut down WSL: Stop the system with this command:

    wsl --shutdown
  4. 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?

You can move Ubuntu WSL by using the 'Move' command in Windows Terminal. First, shut down WSL with 'wsl --shutdown', then run 'wsl --manage Ubuntu --move D:WSLUbuntu' to relocate it to the desired drive.

Can I transfer my WSL distro without losing data?

Yes, transferring your WSL distro using the 'Move' command or by exporting and importing it does not result in data loss. Ensure you follow the steps carefully, and your files will remain intact.

What is the WSL --move command?

The 'wsl --move' command is used to relocate a Linux distribution installed on WSL to a different drive. This command allows you to specify the new location for your distro without needing to uninstall and reinstall it.

Is it necessary to shut down WSL before moving a distro?

Yes, it is essential to shut down WSL before moving a distro to ensure that no processes are running. You can do this by executing the command 'wsl --shutdown' in the Windows Terminal.

What are the steps to export and import a WSL distro?

To export a WSL distro, use the command 'wsl --export Ubuntu C:Ubuntu-export.tar', then to import it to a new location, use 'wsl --import Ubuntu D:WSLUbuntu C:Ubuntu-export.tar'. This method allows you to change the drive while keeping your data safe.

Was this guide helpful?

Tags: #Windows 11
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Leave a Reply

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

Exit mobile version