- Open PowerShell as Administrator.
- Run the following command:
wsl --install
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
- For a more detailed answer you can follow this LINK
- Open Microsoft Store.
- Search for "Ubuntu 20.04".
- Click "Install" and follow the on-screen instructions.
- Launch Ubuntu 20.04 from the Start menu.
- Follow the prompts to set up a new user account and password.
- Open a terminal in Ubuntu.
- Run the following command to update the package lists:
sudo apt update
- Run the following command to install prerequisites:
sudo apt install software-properties-common
- Run the following commands to add the DeadSnakes PPA, which provides newer Python versions:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
- Run the following command to install Python 3.10:
sudo apt install python3.10
- Open a terminal in Ubuntu.
- Run the following command to update the package lists:
sudo apt install git
- After installation, verify that Git is installed by running:
git --version