⚠️ Important: This command must be run in PowerShell with Administrator privileges.
Right-click PowerShell and select "Run as Administrator".
💡 Tip: If you get an execution policy error, use: Set-ExecutionPolicy Bypass -Scope Process -Force; iex (iwr -useb https://smallstepman.github.io/wsl/install.ps1)
What This Script Does
Checks if WSL is already installed
If WSL is already present, it will show version information and exit.
Enables required Windows features
Automatically enables Virtual Machine Platform and Windows Subsystem for Linux.
Installs WSL and default Linux distribution
Downloads and installs the WSL kernel and Ubuntu as the default distribution.
Sets WSL 2 as default
Configures WSL 2 as the default version for better performance.
🚀 Fast Installation
One command to install everything you need to run Linux on Windows.
✅ Safe & Verified
Uses official WSL installation commands from Microsoft.
🔧 Dry Run Mode
Test what would happen without making changes using the -DryRun flag.
Alternative Installation Methods
If you prefer more control over the installation:
# Download and inspect the script first
Invoke-WebRequest -Uri https://smallstepman.github.io/wsl/install.ps1 -OutFile install.ps1
Get-Content install.ps1 # Review the script
# Run with default options
.\install.ps1
# Or test with dry run (no changes made)
.\install.ps1 -DryRun
# Show help
.\install.ps1 -Help
Requirements
Windows 10 version 2004 or higher (Build 19041 or higher)