Answers for "update wsl to wsl2 on command line"

0

wsl convert to wsl2

wsl --set-version <Distro> 2

# For setting all future distributions to use WSL 2
wsl --set-default-version 2
Posted by: Guest on November-09-2020
3

how to WSL2

Enable Windows Subsystem for linux: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Enable Virtual Machine Platform: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Download WSL2 kernel: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

Set default WSL verison: wsl --set-default-version 2
Posted by: Guest on May-09-2021
0

WSL2 .wslconfig Windows

# turn off all wsl instances such as docker-desktop
wsl --shutdown
notepad "$env:USERPROFILE/.wslconfig"

# .wslconfig
[wsl2]
memory=3GB   # Limits VM memory in WSL 2 up to 3GB
processors=4 # Makes the WSL 2 VM use two virtual processors
Posted by: Guest on April-01-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language