uncategorized

wsl-Installer

Install the Windows Subsystem for Linux

1. open PowerShell as Administrator

1
2
> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
# restart your computer when prompted

2. Extract and install a Linux distro

1. Extract the <distro>.appx package’s contents

1
2
Rename-Item ./Ubuntu.appx ./Ubuntu.zip
Expand-Archive ./Ubuntu.zip ./Ubuntu

2. Run the distro launcher To complete installation

1
2
> cd Ubuntu
> ubuntu.exe

3. add your distro path to Windows environment PATH

1
2
3
# PATH: C:\Users\Administrator\Ubuntu 
> $userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
> [System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Administrator\Ubuntu", "User")

Environment setting

3. default Install

1
> Add-AppxPackage package
Share