Instalasi WSL2 ============== Konten berikut diambil dari https://gist.github.com/djibe/c60f6a055779ad89b5f84f81a2d337f7 1. Check Windows Update is active. 2.1. Open Start menu: search for exploit > click on "Exploit protection" result. 2.2. Go to Program settings tab. Search for C:\WINDOWS\System32\vmcompute.exe and vmwp.exe. 2.3. On both: Edit > Code flow guard (CFG) > Override System Settings, set the switch ON and check Strict CFG. 2.4. See previous steps with screenshots here https://www.cyberithub.com/solved-wslregisterdistribution-failed-with-error-0x80370114/ 3. Open Powershell. 4.1. Enable WSL2 .. code-block:: powershell DISM /Online /Enable-Feature /All /FeatureName:VirtualMachinePlatform /all /norestart DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Windows-Subsystem-Linux /all /norestart wsl --update wsl --set-default-version 2 wsl --shutdown 4.2 Activate long paths .. code-block:: powershell Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1 -Type Dword 5. Optional: define CPU + RAM allocation 6.1. Go to C:\Users\USERNAME directory and look for .wslconfig file. If absent, create it. You can then specify the hardware that will be available for WSL. Save file. 6.2. .. code-block:: ini [wsl2] memory=4GB # Limits VM memory in WSL 2 to 4 GB processors=2 # Makes the WSL 2 VM use two virtual processors 7. Install Debian/Ubuntu WSL2 .. code-block:: powershell wsl --install -d Debian 8. Use Linux WSL2 9.1. Update Linux system .. code-block:: bash sudo apt update && sudo apt full-upgrade 9.2. We check that `systemd` is enabled. .. code-block:: bash sudo nano /etc/wsl.conf 9.3. The following lines should be displayed. If not, edit to reproduce it. .. code-block:: ini [boot] systemd=true 9.4. Ctrl + O to save + Enter to confirm. Then Ctrl + X to close. 9.5. Exit WSL2 .. code-block:: bash exit 10. Restart WSL from PowerShell .. code-block:: powershell wsl --shutdown wsl