Table of Contents
The latest version of the Windows Subsystem for Linux is a significant upgrade, and for most it’s now easier then ever to install.
Simplifed setup of WSL2 on Windows 10 and Windows 11
There is now a new, extremely simplified way to get WSL2 up and running on your Windows 10 and Windows 11 PC. The only requirement is that you’re running version 2004 of Windows 10 and above.
If this sounds like your system, ensure you’ve also downloaded the optional KB5004296 update, too, as it’s the one that enables this feature.
Once this is in place, open up PowerShell and enter this command:
That’s it. The setup process will begin and you can relax until it’s finished.
If you don’t have the necessary version of Windows 10 installed to follow the simplified setup, the existing, much longer method still works.
You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.
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.
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 22.214.171.124-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:~$