_partials/windows_wsl.md
WSL is the development environment we are using to run Ubuntu. You can learn more about WSL here.
We will install WSL 2 and Ubuntu in one command through the Windows Command Prompt.
:warning: In the following instruction, please be aware of the Ctrl + Shift + Enter key stroke to execute Windows Command Prompt with administrator privileges instead of just clicking on Okor pressing Enter.
Windows + RcmdCtrl + Shift + Enter:warning: You may have to accept the UAC confirmation about the privilege elevation.
A black terminal window will appear:
Ctrl + C)Ctrl + V or by right-clicking in the window)Enterwsl --install
:heavy_check_mark: If the command ran without any error, please restart your computer and continue below :+1:
:x: If you encounter an error message (or if you see some text in red in the window), please contact a teacher.
<details> <summary>Troubleshooting for Windows 10 (only if needed, check with a TA) </summary>:warning: In the following instruction, please be aware of the Ctrl + Shift + Enter key stroke to execute Windows PowerShell with administrator privileges instead of just clicking on Okor pressing Enter.
Windows + RpowershellCtrl + Shift + Enter:warning: You may have to accept the UAC confirmation about the privilege elevation.
A blue terminal window will appear:
Ctrl + C)Ctrl + V or by right-clicking in the window)EnterEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
:heavy_check_mark: If all three commands ran without any error, please restart your computer and continue below :+1:
:x: If you encounter an error message (or if you see some text in red in the window), please contact a teacher
If you are running Windows 10, we will then upgrade WSL to version 2.
Once your computer has restarted, we need to download the WSL2 installer.
NextFinish:heavy_check_mark: If didn't encounter any error message, you're good to go :+1:
:x: If you encounter the error "This update only applies to machines with the Windows Subsystem for Linux", right click on the program and select uninstall; you shall be able to install it normally this time.
If you are running Windows 10, we will set WSL default version to 2.
Now that WSL 2 is installed, let's make it the default version:
Windows + RcmdEnterIn the window which appears, type:
wsl --set-default-version 2
:heavy_check_mark: If you see "The operation completed successfully", you can close this terminal and continue to follow the instructions below :+1:
:x: If the message you get is about Virtualization, please contact a teacher
<details> <summary>Enable Virtual Machine Platform Windows feature</summary>Follow the steps described here until you enable <strong>Virtual Machine Platform</strong> and <strong>Windows Subsystem for Linux</strong>
</details> <details> <summary>Enable Hyper-V Windows feature</summary>Follow the steps described here until you enable the group <strong>Hyper-V</strong>
:information_source: If you are running Windows 10 Home edition, Hyper-V feature is not available for your operating system. It's non-blocking and you can still continue to follow the instructions below :ok_hand:
</details> </details>