WSL¶
Backing up and Restoring WSL Distributions¶
-
Export a WSL distribution for backup/migration from PowerShell
-
To import a WSL distribution from PowerShell
-
This new WSL distribution will start as the root user. To start as another user, add the following to
/etc/wsl.conf
from inside the distribution -
wsl --shutdown
from PowerShell and restart to see the change
More WSL Commands¶
Command | Description |
---|---|
wsl -l -v |
List WSL distributions along with their state and version |
wsl -t <distribution_name> |
Terminate/shut down a WSL distribution |
wsl --unregister <distribution_name> |
Unregisters WSL distribution and deletes root filesystem |
wsl --help
to see all WSL commands and their descriptions
Commands Inside WSL Distributions¶
-
Sign in to Git using the Git Credential Manager in Windows
-
Open a WSL file/directory using the Windows default program
- For example: File Explorer for directories, Excel for CSV files