【WSL】Open Hyper-V Service in Win11

  1. To use WSL, you need to enable the Hyper-V service. If you can't find Hyper-V in the Add or Remove Programs, it may be because I am using Win11 Home. Then, even after restarting and accessing the BIOS, I couldn't find an option to enable something like Intel Virtualization because I am using Dell. Finally, I successfully enabled the Hyper-V service by following these steps:

  2. Open a text editor and enter the following:

    pushd "%~dp0"
    dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hv.txt
    for /f %%i in ('findstr /i . hv.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
    del hv.txt
    Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
  3. Save it anywhere with the name "hv.bat".

  4. Find this file and right-click to run as administrator. It will take some time to download and install.

  5. Restart your computer, and you will be able to find Hyper-V Manager in the Start menu search.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.