This repository has been archived by the owner on Nov 21, 2022. It is now read-only.
forked from microsoft/WSL2-Linux-Kernel
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WSL2-Linux-Kernel: Add build infrastructure, config, and README
Signed-off-by: Nathan Chancellor <[email protected]>
- Loading branch information
1 parent
dccc51e
commit e4d7293
Showing
17 changed files
with
846 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# About | ||
|
||
This is a custom kernel for Microsoft's [Windows Subsystem for Linux 2](https://docs.microsoft.com/en-us/windows/wsl/install-win10), based on the bleeding edge [linux-next](https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/) and compiled with [clang](https://clang.llvm.org/) with Link Time Optimization. Follow the documentation on Microsoft's website to enable or upgrade to WSL2 for your device and distribution before attempting to install this kernel, as it will not work with WSL1. | ||
|
||
# Installation instructions | ||
|
||
1. Grab the latest release from [the Releases page](https://github.com/nathanchance/WSL2-Linux-Kernel/releases). | ||
|
||
2. Place the kernel somewhere in Windows, such as in a folder in your user folder named Linux (e.g., `C:\Users\natec\Linux\bzImage`). | ||
|
||
3. Open a file editor such as Visual Studio Code and type the following: | ||
|
||
``` | ||
[wsl2] | ||
kernel = | ||
``` | ||
|
||
After that `=`, put the full path to the kernel image with all of the `\` replaced with `\\` (e.g. `C:\\Users\\natec\\Linux\\bzImage`). | ||
|
||
It should look something like: | ||
|
||
``` | ||
[wsl2] | ||
kernel = C:\\Users\\natec\\Linux\\bzImage | ||
``` | ||
|
||
If your username has a space in it (for example, `nathan chance`), do not attempt to escape it with `\` or `"`: | ||
|
||
``` | ||
[wsl2] | ||
kernel = C:\\Users\\nathan chance\\Linux\\bzImage | ||
``` | ||
|
||
4. Save this file as `.wslconfig` in the current user's home directory (e.g. `C:\Users\natec\.wslconfig`). | ||
|
||
5. Restart WSL with `wsl.exe --shutdown` and check that the new image has been booted with `uname -r`. | ||
|
||
To update the kernel, continuously download the latest release from the releases page or use one of the tools mentioned in [this issue](https://github.com/nathanchance/WSL2-Linux-Kernel/issues/5). |
Oops, something went wrong.