Activating Windows Linux Subsystem 2 (WSL2)
Sign up for Windows Insider program
- Go to Register for Windows Insider
- Sign up for Windows Insider program
Activate Windows Insider Builds
Enable Full Diagnostic Data
- go to Settings –> Privacy –> Diagnostics & feedback –> Diagnostic data
- Choose Full as the option
Enable Telemetry Data via Registry
- Open Registry Editor
- Press Windows Key + R then type
regedit
to open registry editor
- Press Windows Key + R then type
- Navigate to:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection
- Right-click DataCollection, click New and then click DWORD (32-bit) Value
- Name it as AllowTelemetry, and then press ENTER
- Double-click AllowTelemetry, set the value as 3, and then click OK.
- Repeat the above steps for:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\DataCollection
- Restart your computer
- Open Registry Editor
Group Policy to enable Telemetry
- Press Windows key + r and type gpedit.msc in the Run prompt, hit ENTER to launch group policy editor
- Go to Computer Configuration –> Administrative Templates –> Windows Components –> Data Collection and Preview Builds
- Double-click Allow Telemetry
- In the Options box, configure the level as 3, and then click OK
Activate Insider Build
Search for Check for Updates in the Windows search menu
In the new window select Windows Insider Program at the bottom of the menu
Select Get Started and follow the instructions, making sure you select Fast when asked
Once you have completed the registration you will need to check for updates and let Windows install the new insider build.
Once done you should restart your computer
Turn on linux subsystem feature
Open Windows PowerShell as administrator and run the commands:
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You will need to restart your computer again
Download the linux distro
Open the Microsoft Store and choose your favorite Linux distribution by searching for them (I prefer Ubuntu):
From the distro’s page, select Get
Once done installing, open up Powershell as administrator and run (replace distro with the name of the distro you installed):
wsl --set-version [Distro] 2
wsl --set-default-version 2
Finalizing
To complete the initialization of your newly installed distro, launch a new instance by searching in the Start menu and launching the distro
The first time a newly installed distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete
Once installation is complete, you will be prompted to create a new user account (and its password)
Most distros ship with an empty/minimal package catalog. You should regularly be updating your package catalog, and upgrading your installed packages using your distro’s preferred package manager
sudo apt-get update && sudo apt-get upgrade