> For the complete documentation index, see [llms.txt](https://tk233.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tk233.gitbook.io/notes/tools/windows/install-wsl-2.md).

# Install WSL 2

For Ubuntu downloaded from the Microsoft store, WSL 2 might not be available directly by running the command

```bash
wsl --set-version Ubuntu 2
```

If it errors out, download the "WSL2 Linux kernel update package for x64 machines" update package from <https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package>

<figure><img src="/files/xs7g4wV3PCCfEE4CuJls" alt=""><figcaption></figcaption></figure>

Run this command to verify the current version

```bash
wsl -l -v
```

When success, it should look something like:

```bash
PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Stopped         2
```
