Skip to content

slyfox1186/wsl2-kernel-build-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows WSL2 Kernel Build Script

Overview

This document details the process of building the latest Microsoft WSL2 (Windows Subsystem for Linux 2) kernel from source. The source code is available on Microsoft's official GitHub page. This guide is specifically designed for users looking to update their WSL2 kernels for Debian or Ubuntu distributions running on x86_64 architecture.

Purpose

  • To compile and integrate the latest Microsoft WSL2 kernel release with your current Linux distributions on WSL2.

Installation Instructions

There are two methods to download and run the build script:

  • Direct Download and Execution:

    • Download and execute the script in one step:

      curl -Lso build-kernel.sh https://wsl.optimizethis.net
      sudo bash build-kernel.sh
    • Clone the repository and execute the build script:

      git clone https://github.com/slyfox1186/wsl2-kernel-build-script.git
      cd wsl2-kernel-build-script
      sudo bash build-kernel.sh
  • Download Link for the Script:

    If you prefer manually downloading the script before executing, use this direct download link for the build script.

Post-Installation Steps

  1. Kernel File Relocation:

    The build script outputs a new kernel file named vmlinux. Move this file to a directory within your Windows user profile path. Example location:

    %USERPROFILE%\WSL2\vmlinux
  2. WSL Configuration:

    To use the new kernel, create a .wslconfig file at %USERPROFILE%\.wslconfig and configure it to point to your new kernel file. Detailed instructions and configuration options can be found in the WSL configuration guide.

    A sample .wslconfig file to get started can be found here.

Additional Resources

About

Build the latest released kernel from Microsoft's GitHub Page.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages