Windows Subsystem for Linux (WSL) Setup Guide
This guide outlines the process of transforming a standard Windows installation into a Developer Workstation capable of running Linux natively using WSL2.
1. Pre-Flight Check (Audit)
Before attempting installation, we must verify that your Windows Edition (Home/Pro) supports the necessary virtualization engines.
- Action: Run the Windows Feature Auditor.
- Reference: Windows Feature Auditor
- Goal: Ensure
Microsoft-Windows-Subsystem-LinuxandVirtualMachinePlatformare not marked as "Unsupported".
2. Safety Backup
Since we will be modifying boot-level features and registry keys, it is best practice to backup your current configuration.
- Action: Run the Backup Dev Settings script.
- Reference: Backup Dev Settings
- Goal: Create a timestamped
.regfile of your current system state.
3. Prepare the Environment (The "Garage")
We need to enable the Windows features that act as the host for Linux. This involves enabling the WSL Engine, Virtual Machine Platform, and Developer Mode.
- Action: Run the Set DevOptimized script.
- Reference: Set Dev Optimized
- Note: This script will require a System Restart to finalize the installation of the Hypervisor.
4. Install Linux (The "Car")
Once the system has rebooted and the "Garage" (WSL Platform) is active, you can install the actual Linux Operating System.
- Open PowerShell as Administrator.
- Run the install command:
wsl --install(This installs Ubuntu LTS by default. To install a different distribution, use
wsl --list --onlineto view options). - Post-Install: A terminal window will launch asking you to create a UNIX Username and Password.
5. Verification
To confirm Linux is running on WSL2:
- Run:
wsl -l -v - Expected Output:
Ubunturunning on Version2.
6. Revert Changes
If you need to remove Linux and disable the virtualization engines to return to a stock Windows configuration:
- Action: Run the Reset Dev Defaults script.
- Reference: Reset Dev Defaults
- Result: This will disable WSL, VM Platform, and Developer Mode.