Try   HackMD

How to install kali-wsl

Author: Junner
Date: 2024/09/24

Commands

  1. Open Command Prompt or PowerShell as an administrator. [1]

  2. Run the following commands. [1]

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all
  1. Reboot your computer to apply the changes.

  2. Set the wsl version. [1]

    You can choose wsl1 or wsl2 for your destiny version.

    Windows Subsystem for Linux (WSL) has two different versions, “WSL 1” and “WSL 2”. WSL 2 is the preferred and default option when installing WSL. This is because WSL 2 uses the actual Linux kernel inside a Hyper-V virtual machine (managed by WSL). WSL 1 uses a “translation layer” which is similar to WINE.

    Run:

    ​​​​wsl --set-default-version <version>

    For example, to set it to wsl2, you would enter

    ​​​​wsl --set-default-version 2

    On some computer, wsl2 doesn't run well. And you may set the version to 1.

    ​​​​wsl --set-default-version 1
  3. Windows sets Ubuntu as the default distro. To list other distro, run the command below and look for the name containing kali. [2]

    ​​​​wsl -l -o

    圖片

  4. Installation [2]

    ​​​​wsl --install -d kali-linux

References