refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / wsl1 / README.md
1 ---
2 title: WSL 1
3 homepage: https://docs.microsoft.com/en-us/windows/wsl/install-win10
4 tagline: |
5   WSL 1 (Windows Subsystem for Linux) is required for running Microsoft Linux in Windows Terminal.
6 ---
7
8 ## Read Carefully!
9
10 1. WSL is a **system** service which **requires Admin privileges** to install.
11 2. A **System Reboot** is **required** before WSL can be used.
12
13 ## Cheat Sheet
14
15 > WSL 1 (also known as _Bash for Windows_) allows you to run _most_ Linux
16 > applications directly from within Windows. This is _NOT_ emulation, _NOR_
17 > virtualization, but rather a a Linux syscall wrapper around the Windows
18 > Kernel.
19
20 This will install **WSL 1 ONLY**.
21
22 **Most people** want [WSL 1 + WSL 2 + Linux](https://webinstall.dev/wsl). \
23 (WSL 2 is NOT a replacement for WSL 1, it's just another _layer_ of WSL)
24
25 See the **Full Cheat Sheet** at <https://webinstall.dev/wsl>.
26
27 ### How to Install Linux
28
29 Once WSL is installed you can download Linux from the Windows Store. We
30 recommend:
31
32 - [Ubuntu Linux 20.04](https://www.microsoft.com/store/apps/9n6svws3rx71)
33 - [Alpine WSL](https://www.microsoft.com/store/apps/9p804crf0395)
34
35 ### How to Switch to WSL 1
36
37 To set WSL 1 as the default:
38
39 ```pwsh
40 wsl --set-default-version 1
41 ```
42
43 To set WSL 1 for a specific Linux installation:
44
45 1. List all installed Linux versions
46    ```pwsh
47    wsl --list
48    ```
49 2. Set the desired version to WSL 2 with `--set-version`. For example:
50    ```pwsh
51    wsl --set-version Ubuntu-20.04 1
52    ```
53
54 ### How to Install WSL 1 with PowerShell
55
56 This installer uses this command to install WSL 1
57
58 ```pwsh
59 powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% && dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart'"
60 ```
61
62 ## References
63
64 - https://docs.microsoft.com/en-us/windows/wsl/install-win10