- Press the
Win
+R
Key - Type in
winver
and pressEnter
- Reboot your computer and press the
F10
,F2
,F12
,F1
, orDEL
key (depends on the manufacturer) to enter the BIOS. - Look for and enable the virtualization option in the BIOS settings (something like
Virtualization Technology (VTx)
) - Save and reboot
-
Windows 10 64-bit: Pro, Enterprise, or Education: You need at least Build 16299 or later.
-
Windows 10 64-bit Home: You need at least Version 1903 or higher with Build 18362 or later.
Use the Windows Update Assistant to update your system to the latest version
-
Left click on the Windows button, search for Turn Windows Features on or off:
Apply the updates and restart your machine!
https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel
Open the PowerShell as Administrator and run the command:
wsl --set-default-version 2
Go to the Microsoft Store and install Ubuntu 20-04 LTS. Also have a look here: here: https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-6---install-your-linux-distribution-of-choice
Once the installation finshed you need to type in a new username and password for Ubuntu/WSL.
If your are already running WSL 1 then you should update from WSL 1 to WSL 2. Find out the name of your distribution (type that into the powershell):
wsl --list --verbose
To change the WSL version to 2, type in:
wsl --set-version <distribution name> 2
Updating an existing WSL distribution from WSL1 to WSL2 can take several minutes (up to 30 minutes!).
Download the installer from here: https://hub.docker.com/editions/community/docker-ce-desktop-windows/
Follow the instructions here: https://docs.docker.com/docker-for-windows/install/#install-docker-desktop-on-windows
When prompted, ensure the Enable WSL 2 Features option is selected on the Configuration page.
If your admin account is different to your user account, you must add the user to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the user to the group. Log out and log back in for the changes to take effect.
Also see here: https://docs.docker.com/docker-for-windows/wsl/
Open Docker Desktop and activate WSL 2:
Also make sure to activate WSL 2 for all your additional distributions (click on every switch:
**Apply and restart **!
Restart your computer, open WSL and type in:
docker run hello-world
If you see this message:
Hello from Docker!
This message shows that your installation appears to be working correctly.
Then your installation worked!
To install python inside the WSL (type that in the ubuntu shell)
- Download the installer:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
- Execute it:
bash Miniconda3-latest-Linux-x86_64.sh
- Press
ENTER
andyes
whenever you get asked for it - After the installation, type in
~/miniconda3/bin/conda init bash
to activate conda and python - Restart the terminal
- to drag and drop files from windows to WSL you can open the file navigator by typing into the Ubuntu command line/WSL:
explorer.exe .
- you can also open VSCode inside WSL by typing into the Ubuntu command line/WSL:
code .
Open the PowerShel and type in the command:
wsl --list --verbose
To change the WSL version of a specific distribution, type in:
wsl --set-version <distribution name> <versionNumber>
To remove a legacy version of WSL type in:
wsl --unregister Legacy