How can you do a backup of your WSL distro?
Experience Level: Junior
Tags: WSL
Answer
Run the following command from command-line:
wsl --export YourDistroName %userprofile%\distro.zip
Note that your distro will be stopped when exporting.
Related WSL job interview questions
How can you allow a Git in WSL use your Windows Git credentials?
WSL JuniorHow do you copy output of commands in WSL to clipboard?
WSL JuniorHow can you run Windows commands from Linux?
WSL JuniorHow can you start all containerized services described in docker-compose file directly from Windows when the docker-compose.yml file is stored in WSL?
WSL JuniorWhat is the advantage of Visual Studio Code Remote-WSL extension?
WSL Junior