1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-28 15:55:28 +02:00
tldr/pages/windows/wsl.md
Managor d67651776d
wsl: add option placeholders (#17233)
* Update wsl.md

* Update wsl.md

---------

Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com>
2025-07-15 14:21:15 +02:00

879 B

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 {{[-e|--exec]}} {{command}} {{command_arguments}}

  • Specify a particular distribution:

wsl {{[-d|--distribution]}} {{distribution}} {{shell_command}}

  • List available distributions:

wsl {{[-l|--list]}}

  • Export a distribution to a .tar file:

wsl --export {{distribution}} {{path\to\distro_file.tar}}

  • Import a distribution from a .tar file:

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