WSL 2 Installation in Windows11

  • Run Windows Terminal as administrator

  • Enable Microsoft-Windows-Subsystem-Linux Features

1
$ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  • Enable the VirtualMachinePlatform feature
    • Reboot if the operation is completed successfully.
1
$ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Step 2. WSL2 Kernel Update

1
$ wsl --set-default-version 2
  • Install Ubuntu, the most popular Linux distribution, and run as administrator.

    ![](/images/Setting/wsl2/Untitled 1.png)

  • In Ubuntu, Set the username and password.

  • Check the currently installed version with wsl -l -v

1
2
3
$ wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
  • If it says version 1, execute the following command.
1
2
3
4
5
$ wsl --set-version Ubuntu 2

변환이 진행 중입니다. 몇 분 정도 걸릴 수 있습니다...
WSL 2와의 주요 차이점에 대한 자세한 내용은 [https://aka.ms/wsl2를](https://aka.ms/wsl2%EB%A5%BC) 참조하세요
변환이 완료되었습니다.
  • Make sure that it says version 2.
1
2
3
$ wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2

Reference

Share