Skip to content

ptrhck/WSL2setup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSL2setup

This script allows you to quickly get up and running with WSL2 on Windows 10 Build 2004. This script allows allows for easy install of various Linux distros.

Quickstart

To quickly get up and running with WSL2, open a new PowerShell window as "Admin" and run the following one-liner:

iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/JtJeS'))

You will have to run this one-liner twice.

  • Once to install Windows pre-requisites
  • Once after the computer re-boots to update the WSL2 kernel and install a WSL distro (Ubuntu 18.04 recommended)

Prerequisites

You will need to have Windows 10 Build 2004 installed before you can use WSL2. If you do not already have Build 2004 or later installed, you can use the Windows Update Assistant to upgrade to the latest 2004 build.

Testing

This script is tested and working on bare-metal as well as a Hyper-V VM with nested virtualization turned on.

Make sure that Dynamic Memory is disabled. To turn on nested virtualization on Windows Server 2016+ or Windows 10 you can use the following command:

(Get-VM).Name # Get a list of VM names
Set-VMProcessor -VMName [TestVMName] -ExposeVirtualizationExtensions $true 

WSL2 on a KVM-based VM with nested virtualization, does not appear to work.

About

Install WSL2 and handle dependencies

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 50.7%
  • PostScript 49.3%