author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 26 Oct 2020 12:51:23 +0200 | |
changeset 2441 | 58d60b3e470a |
parent 2423 | 6a4fd5ccb340 |
child 2457 | 9e6abc83e5d6 |
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 |
||
2423
6a4fd5ccb340
Mounting external drives.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2368
diff
changeset
|
47 |
Mounting external drives |
6a4fd5ccb340
Mounting external drives.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2368
diff
changeset
|
48 |
======================== |
6a4fd5ccb340
Mounting external drives.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2368
diff
changeset
|
49 |
|
6a4fd5ccb340
Mounting external drives.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2368
diff
changeset
|
50 |
:: |
6a4fd5ccb340
Mounting external drives.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2368
diff
changeset
|
51 |
|
6a4fd5ccb340
Mounting external drives.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2368
diff
changeset
|
52 |
sudo mkdir /mnt/f |
6a4fd5ccb340
Mounting external drives.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2368
diff
changeset
|
53 |
sudo mount -t drvfs f: /mnt/f |