How do you install a WSL distro to a different drive?
Experience Level: Junior
Tags: WSL
Answer
Run the following from he command-line
wsl --export <YourFileName>
Then duplicate the distro by running
wsl --import <DistroName> <Location> <YourFileName>
Then unregister the original distro by running
wsl --unregister <OldDistroName>
Related WSL job interview questions
How do you install WSL Ubuntu distribution easily?
WSL JuniorHow can you duplicate a WSL distro?
WSL JuniorHow can you access WSL 2 distribution from your LAN?
WSL JuniorHow 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 Junior