An automated, step-by-step batch processing utility to properly configure, update, and deploy Windows Subsystem for Linux 2 (WSL2) on Windows environment installations. This project splits the complex setup into clean, readable batch modules to ensure error-free initialization.
Important
Administrative Privileges Required: You MUST execute these batch files with administrator permissions. If you run them normally, Windows will block the installation of the required virtual features.
Manually installing WSL2 can lead to missing optional features, architecture mismatch errors, or outdated virtualization kernels. These modular batch scripts manage everything for you safely and sequentially.
- Automated Feature Provisioning: Installs WSL core components and the Virtual Machine Platform automatically.
- Modular Safety Execution: Split into distinct parts so you can safely restart your computer when Windows requires it without breaking the pipeline.
- Architecture Validation: Tailored optimally for standard Windows x64 setups.
- OS: Windows 10 (Build 19041 and higher) or Windows 11.
- Architecture: Intel / AMD x64.
- Permissions: Administrative rights are required to enable Windows Virtualization hooks.
Because Windows must activate system-level features, the setup is cleanly broken into chronological parts.
This enables the underlying Windows Subsystem for Linux framework and required virtual network infrastructure.
- Right-click
Part1.batand select "Run as Administrator". - Note: Your computer will prompt or require a system reboot after this step to apply virtual features.
This updates your system to the modern WSL2 kernel subsystem layer.
- Right-click
Part2.batand select "Run as Administrator". - This sets the global execution defaults to version 2:
wsl --set-default-version 2
Final check to verify deployment environment integrity.
- Right-click
Part3.batand select "Run as Administrator" to verify your running version status.
├── Part1.bat # Stage 1: Dispatches Windows Optional Features (DISM) [Requires Admin]
├── Part2.bat # Stage 2: Configures default WSL kernel versioning [Requires Admin]
├── Part3.bat # Stage 3: Post-installation verification wrapper [Requires Admin]
└── README.md # Documentation storefront
Contributions make the open-source community amazing! Feel free to fork this project, fix potential edge-case system paths, or add support for automated Linux distro provisioning packages.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.