This tutorial is about How to backup/restore WSL distros in Windows 11. We will try our best so that you understand this guide. I hope you like this blog, How to backup/restore WSL distros in Windows 11. If your answer is yes, please do share after reading this.
So lets keep reading for intertesting info:
Check How to backup/restore WSL distros in Windows 11
Linux is an open source operating system like other operating systems like Microsoft Windows, Apple Mac OS, iOS, Google Android, etc. An operating system is software that enables communication between computer hardware and software. It transmits the input for processing by the processor and returns the output to the hardware for display. Windows Subsystem for Linux, or WSL, is an optional feature in Windows 10 that allows Linux programs to run natively on Windows.
WSL was designed by Microsoft in collaboration with Canonical, the creators of Ubuntu. Together, they created a kernel compatibility layer based on Ubuntu. This compatibility layer allows Linux programs to run in a Windows 10 version of the Bash shell. Microsoft has introduced Windows Subsystem for Linux (WSL) in the Windows 11 operating system, a feature that was first released with Windows 11.
WSL has also been updated to version 2 (also known as WSL2), which comes with performance improvements. If you’ve been using the WSL feature to run a Linux virtual machine on your Windows 11 computer, then it’s a good idea to back up your distribution, just in case you need it in the future if something goes wrong. Fortunately, the Windows operating system allows users to do so.
How to backup/restore WSL distributions in Windows 11
How to Backup Linux Distribution on WSL
To back up a WSL Linux installation on Windows 11, follow these steps:
- Open Start in Windows 11.
- Search for Command Prompt, right-click on the top result and select the Run as administrator option.
- Type the following command to determine the available Linux distributions and press Enter:
- Type the following command to create a backup copy of the WSL distribution and press Enter:
- wsl –export PATH OF DISTRO NAMEFILENAME.tar
- In the command, change DISTRO-NAME and PATHFILE-NAME.tar with the information for your distribution. If you don’t specify a path, the backup will be stored in the root of “C:”.
- For example, this command backs up (exports) the Ubuntu distribution:
- wsl –export Ubuntu ubuntu-backup.tar
- Once you complete the steps, the virtual machine will be exported to the root of the main system drive (C:) unless you specify another location.
How to restore Linux distribution in WSL
To import a Linux distribution from backup into Windows Subsystem for Linux 2, follow these steps:
- Open Home.
- Search for Command Prompt, right-click on the top result and select the Run as administrator option.
- Type the following command to import or restore Linux distributions from backup and press Enter:
- wsl –import DISTRO NAME PATH TO INSTALL LOCATIONFILENAME.tar
- In the command, change DISTRO-NAME, INSTALL-LOCATION, and PATHFILE-NAME.tar with the information for your distribution.
- For example, this command restores (imports) the Ubuntu distribution:
- wsl –import Ubuntu C:UsersUSERNAMEDistros C:ubuntu-backup.tar
- Type the following command to confirm that the distribution has been restored and press Enter:
- Type the following command to start the distribution on Windows Subsystem for Linux and press Enter:
- wsl –distribution DISTRO-NAME
After completing the steps, the distribution will be imported to the specified destination. The only caveat is that this backup and restore does not have the same integration as installing distributions from the Microsoft Store. For example, once the distro is imported, it won’t register in the Start menu and won’t show up as an app that you can remove from the “Apps & features” settings page.
Final words: How to backup/restore WSL distros in Windows 11
I hope you understand this article, How to backup/restore WSL distros in Windows 11. If your answer is no, you can ask anything via the contact forum section related to this article. And if your answer is yes, please share this article with your friends and family to give us your support.