wsl
Manage the Windows Subsystem for Linux. More information: https://learn.microsoft.com/windows/wsl/reference.
-
Start a Linux shell (in the default distribution):
wsl {{shell_command}} -
Run a Linux command without using a shell:
wsl --exec {{command}} {{command_arguments}} -
Specify a particular distribution:
wsl --distribution {{distribution}} {{shell_command}} -
List available distributions:
wsl --list -
Export a distribution to a
.tarfile:
wsl --export {{distribution}} {{path\to\distro_file.tar}} -
Import a distribution from a
.tarfile:
wsl --import {{distribution}} {{path\to\install_location}} {{path/to/distro_file.tar}} -
Change the version of wsl used for the specified distribution:
wsl --set-version {{distribution}} {{version}} -
Shut down Windows Subsystem for Linux:
wsl --shutdown
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.