check if wsl is installed in windows code example
Example 1: ubuntu wsl windows 10
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Example 2: powershell set wsl 2
wsl --list --verbose
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
wsl --list --verbose