How to Back Up and Restore Linux on WSL

Richard
Written byRichardTech Writer, IT Professional
Jan 21, 2022 Updated Apr 15, 2026 3 min read Reviewed Mar 19, 2026

This guide explains how to back up and restore your Linux environment on the Windows Subsystem for Linux (WSL) Windows Subsystem for Linux (WSL). By using the export and import features, you can save your Linux files and restore them if something goes wrong.

Why back up your Linux environment?

WSL lets you run Linux tools right inside Windows. If your Linux setup gets corrupted or stops working, having a backup allows you to recover your work quickly without starting from scratch.

What happens when you are done?

Once you import a backup, your Linux distribution will function normally. However, it will no longer be linked to the Microsoft Store Start menu, meaning it will not appear in your Windows Apps & features list.

How to back up and restore Linux on WSL

To perform these steps, you will need to open your command tool as an administrator.

1. Open the Start menu, search for your command tool, and launch it Command Prompt as administrator.

Windows 11 Command Prompt running as administrator for WSL backup

2. First, see which Linux systems are currently on your computer by typing this command:

wsl.exe --list

3. To back up your Linux system, use the export command. Replace “Ubuntu-20.04” with your specific system name:

wsl --export Ubuntu-20.04 C:\backup\my-linux-backup.tar

4. To restore your Linux system from a backup file, use the import command. Note: This requires admin privileges.

wsl --import Ubuntu-20.04 C:\Users\genericuser\Ubuntu C:\backup\my-linux-backup.tar

By default, Windows keeps your Linux files here: C:\Users\genericuser\AppData\Local\Packages. You can choose to restore your files to this folder or any other location you prefer.

Remember, after importing, the system will not show up in the Start menu or the Apps & features list Start menu, but all your files and programs will be ready to use.

Summary

Backing up your WSL environment is a simple way to protect your data. Use the wsl --export command to save your Linux system and the wsl --import command to bring it back. While imported systems lose some Windows integration, they remain fully functional for your development needs.

How do I back up my Linux distribution on WSL?

To back up your Linux distribution on WSL, open Command Prompt as an administrator and use the command 'wsl –export '. Replace with your Linux distribution name and with the desired location for the backup file.

What command do I use to restore a Linux distribution on WSL?

To restore a Linux distribution on WSL, use the command 'wsl –import '. Make sure to replace with the desired name for the restored distribution, with where you want to install it, and with the path to your backup file.

Will my Linux distribution appear in the Start menu after restoring it?

No, after restoring a Linux distribution using the export and import method, it will not appear in the Start menu or the Apps & features settings. However, all other functionality will remain intact.

Can I back up multiple Linux distributions on WSL?

Yes, you can back up multiple Linux distributions on WSL by running the export command for each distribution individually. Just make sure to specify different backup file paths for each one to avoid overwriting.

Is it safe to back up and restore Linux distributions on WSL?

Yes, backing up and restoring Linux distributions on WSL is generally safe. However, it's always a good practice to ensure that you have a reliable backup and to follow the correct command syntax to avoid data loss.
Richard2472 articles

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.

Expertise:Windows 11Ubuntu LinuxCMSApps and Browsers
View all articles by Richard →

Categories:

,

Leave a Reply

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