Install WSL in Windows 11 With One Command

Опубликовано: 19 Август 2026
на канале: ZassTech Dev
33
1

Most developers write five steps to install WSL. You only need one line of PowerShell.

▶ Final output when you run this code:
Selected user: Ali

📋 Code explained line by line:
1. $distro = "Ubuntu"
→ Creates a variable named distro containing the value Ubuntu for later use
2. winget install --id ${distro.Replace(' ', '')} -e --source winget
→ Installs a package identified by Ubuntu with strict matching against winget repository