Table of Contents
You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.
If you’re running an older version of Windows 10, let’s visit this article to enable WSL.
Enable WSL in Windows 10
1. Right click on the Windows start icon then open Windows PowerShell admin.
2. This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux.
PS C:\> wsl --install Installing: Virtual Machine Platform Virtual Machine Platform has been installed. Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. Downloading: WSL Kernel Installing: WSL Kernel WSL Kernel has been installed. Downloading: Ubuntu The requested is successful. Changes will not be effective until the system is rebooted.
3. The first time you launch a newly installed Linux distribution, a console window will open and you’ll be asked to wait for files to de-compress and be stored on your machine.
Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username: bon New password: Retype new password: passwd: password updated successfully Installation successful! To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. Welcome to Ubuntu 20.04 LTS (GNU/Linux 220.127.116.11-microsoft-standard-WSL2 x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Sat Oct 1 21:51:09 +07 2022 System load: 0.26 Processes: 8 Usage of /: 0.4% of 250.98GB Users logged in: 0 Memory usage: 1% IPv4 address for eth0: 172.17.140.234 Swap usage: 0% 0 updates can be installed immediately. 0 of these updates are security updates. The list of available updates is more than a week old. To check for new updates run: sudo apt update This message is shown once once a day. To disable it please create the /home/bon/.hushlogin file. bon@DESKTOP-DL81K4A:~$