mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-05 14:44:24 +00:00
42 lines
970 B
Plaintext
42 lines
970 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, windows]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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 o\distro_file.tar}}`
|
|
|
|
- Import a distribution from a `.tar` file:
|
|
|
|
`wsl --import {{distribution}} {{path o\install_location}} {{path o\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`
|