alt text

To setup WSL2 on Windows 10 - MS Docs, you can go to Add or Remove Programs, Programs and Features, Turn Windows Features on or Off, Windows Subsystem for Linux

Or from Powershell as Admin:

Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

You may need to install the WSL2 Kernel - MS Docs

Useful commands

wsl --list --verbose
 
wsl --set-version Ubuntu 2

wsl --set-default-version 2

wsl --unregister Ubuntu

alt text

Conclusion

I use WSL2 all the time now for running bash scripts which use the Azure CLI and I’ve switched to running Jekyll from WSL2 instead of Docker