Guide created by @jfryton. Thank you jfryton.
Here’s an easy-to-follow, step-by-step guide for installing Windows Subsystem for Linux (WSL) with Ubuntu on Windows 10/11:
wsl --install
If this command doesn’t work, you can enable WSL with the following command for Windows 10:
wsl --set-default-version 1
For Windows 11, you can use:
wsl --set-default-version 2
You may be prompted to restart your computer. If so, save your work and restart.
sudo apt update
sudo apt upgrade
Congratulations! You have now installed WSL with Ubuntu on your Windows 10/11 system. You can use the Ubuntu terminal for various tasks, like running Linux commands, installing packages, or managing files.
You can launch your WSL Ubuntu installation by selecting the Ubuntu app (like any other program installed on your computer) or typing ‘ubuntu’ into Powershell or Terminal.
sudo apt install [missing package]
You will probably need to install build-essential
sudo apt install build-essential
If you face any issues or need to troubleshoot, you can always refer to the official Microsoft documentation for WSL: https://docs.microsoft.com/en-us/windows/wsl/
By default, you won’t be able to access the webui from another device on your local network. You will need to setup the appropriate port forwarding using the following command (using PowerShell or Terminal with administrator privileges).
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=7860 connectaddress=localhost connectport=7860