author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 05 Jan 2020 23:56:26 +0200 | |
changeset 2401 | 7f6cf1952337 |
parent 2368 | 574d07ac6f55 |
child 2423 | 6a4fd5ccb340 |
permissions | -rw-r--r-- |
2365 | 1 |
|
2 |
================================== |
|
3 |
WSL, Windows subsystem for Linux |
|
4 |
================================== |
|
5 |
.. contents:: |
|
6 |
:local: |
|
7 |
||
8 |
wsl utility |
|
9 |
=========== |
|
10 |
||
11 |
Run Linux command from default distro:: |
|
12 |
||
13 |
wsl ls |
|
14 |
wsl -e /bin/ls |
|
15 |
wsl --exec /bin/bash |
|
16 |
||
2366
55f48026a610
Run Linux command from specific distro.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2365
diff
changeset
|
17 |
Run Linux command from specific distro:: |
55f48026a610
Run Linux command from specific distro.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2365
diff
changeset
|
18 |
|
55f48026a610
Run Linux command from specific distro.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2365
diff
changeset
|
19 |
wsl -d ubuntu ls |
55f48026a610
Run Linux command from specific distro.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2365
diff
changeset
|
20 |
wsl -d debian -e /bin/ls |
55f48026a610
Run Linux command from specific distro.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2365
diff
changeset
|
21 |
wsl -d debian --exec /bin/bash |
55f48026a610
Run Linux command from specific distro.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2365
diff
changeset
|
22 |
wsl -distribution debian --exec /bin/bash |
55f48026a610
Run Linux command from specific distro.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2365
diff
changeset
|
23 |
|
2367
f295973a87a5
Run Linux command from specific user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2366
diff
changeset
|
24 |
Run Linux command from specific user:: |
f295973a87a5
Run Linux command from specific user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2366
diff
changeset
|
25 |
|
f295973a87a5
Run Linux command from specific user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2366
diff
changeset
|
26 |
wsl -u user ls |
f295973a87a5
Run Linux command from specific user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2366
diff
changeset
|
27 |
wsl --user root ls |
f295973a87a5
Run Linux command from specific user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2366
diff
changeset
|
28 |
|
2368 | 29 |
wslconfig utility |
30 |
================= |
|
31 |
||
32 |
List distros:: |
|
33 |
||
34 |
wslconfig /l |
|
35 |
wslconfig /list |
|
36 |
||
37 |
Set default distro:: |
|
38 |
||
39 |
wslconfig /s debian |
|
40 |
wslconfig /setdefault debian |
|
41 |
||
42 |
Terminate any running parts of distro:: |
|
43 |
||
44 |
wslconfig /s debian |
|
45 |
wslconfig /terminate debian |
|
46 |