|
37 | 37 | </header>
|
38 | 38 | <div class="body">
|
39 | 39 | <h1 id="Windows_bootstrap">Windows bootstrap</h1>
|
40 |
| - <h2 id="Setting_up_WSL2_on_Windows_10_11">Setting up WSL2 on Windows |
| 40 | + <h2 id="Setting_up_WSL_2_on_Windows_10_11">Setting up WSL 2 on Windows |
41 | 41 | 10/11</h2>
|
42 |
| - <p>WSL2 (short for "Windows Subsystem for Linux 2") allows users to build |
| 42 | + <p>WSL 2 (short for "Windows Subsystem for Linux 2") allows users to build |
43 | 43 | and run Linux applications within their Windows environment. This is a
|
44 | 44 | great alternative to students who have no interest in setting up a dual
|
45 | 45 | boot of Windows and a Linux distro.</p>
|
46 |
| - <p>First, we need to enable two different features: HyperV and WSL2 itself. |
47 |
| - This can be achieved by opening up PowerShell as an administrator and |
48 |
| - running the following commands:</p> |
49 |
| - <h3>HyperV</h3><code>dism.exe /online /enable-feature |
50 |
| - /featurename:VirtualMachinePlatform /all /norestart</code> |
51 |
| - <h3>WSL2</h3><code>dism.exe /online /enable-feature |
52 |
| - /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart</code> |
53 |
| - <blockquote> |
54 |
| - <i>Note:</i> The previous iteration, WSL1, is also available when |
55 |
| - installing new distros onto your system. To ensure you are using WSL2 |
56 |
| - when installing any distro: run the following command: <code>wsl |
57 |
| - --set-default-version 2</code> |
58 |
| - </blockquote> |
| 46 | + <p>First, we need to enable two different features: HyperV and WSL 2 |
| 47 | + itself. Open PowerShell as an administrator and running the following |
| 48 | + commands:</p><code>dism.exe /online /enable-feature |
| 49 | + /featurename:VirtualMachinePlatform /all /norestart</code> <code>dism.exe |
| 50 | + /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all |
| 51 | + /norestart</code> |
| 52 | + <p>Restart your computer to complete the feature enable process.</p> |
| 53 | + <p>To ensure your distros are run with WSL 2 instead of WSL 1, run |
| 54 | + <code>wsl --set-default-version 2</code>. If it prints "WSL 2 requires an |
| 55 | + update to its kernel component", download and run the MSI installer at |
| 56 | + <a href="https://aka.ms/wsl2kernel">https://aka.ms/wsl2kernel</a>.</p> |
| 57 | + <p>If you already have distros using WSL 1, you can convert them with |
| 58 | + <code>wsl --set-version distro-name-here 2</code> where "distro-name-here" |
| 59 | + is the distro name from <code>wsl --list</code>.</p> |
59 | 60 | <p>Next, you can open up the <a href="https://aka.ms/wslstore">Microsoft
|
60 | 61 | Store WSL page</a> and select a distro you wish to install We recommend
|
61 | 62 | using Ubuntu, the <a href=
|
62 | 63 | "https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6">latest version</a>
|
63 | 64 | will work fine. To install, press the "Get" button. Please note a Microsoft
|
64 | 65 | account is required to download.</p>
|
65 |
| - <p>Once it's finished, launch the app from the Start Menu. A terminal will |
66 |
| - fire up and ask for a new username and password if being used for the first |
67 |
| - time. Set them to your preference, but choose a password you will remember |
68 |
| - as it will be needed when performing some commands like installing any |
69 |
| - packages.</p> |
70 |
| - <p><i>Congrats!</i> Your new WSL2 system is ready to be used.</p> |
| 66 | + <p>Once it's finished, launch the WSL app from the Start Menu. A terminal |
| 67 | + window will open and ask for a new username and password if being used for |
| 68 | + the first time. Set them to your preference, but choose a password you will |
| 69 | + remember as it will be needed when performing some commands like installing |
| 70 | + any packages.</p> |
| 71 | + <p><i>Congrats!</i> Your new WSL 2 system is ready to be used.</p> |
71 | 72 | <h2 id="Tools_installation">Tools installation</h2>
|
72 | 73 | <p>See <a href="../ubuntu/#Tools_installation">Ubuntu tools
|
73 | 74 | installation</a>.</p>
|
74 |
| - <p>Since WSL2 runs seperately from base Windows, a seperate extension is |
75 |
| - needed for VSCode to have the ability of accessing WSL2 file system. This |
| 75 | + <p>Since WSL 2 runs seperately from base Windows, a seperate extension is |
| 76 | + needed for VSCode to have the ability of accessing WSL 2 file system. This |
76 | 77 | extension can be downloaded by opening Quick Search (Ctrl+P) and typing in:
|
77 | 78 | <code>ext install ms-vscode-remote.remote-wsl</code> to install it.</p>
|
78 | 79 | </div>
|
|
0 commit comments