Install WSL (Windows Subsystem for Linux)
Warning This guide is under construction! The respective TL (Team Lead) will let you know as soon as it can be used in full.
For questions regarding the setup on Windows, contact Tobias Hopp or Hasan Dogan.
Preliminary Notes
- The PC must be restarted several times during the installation. Therefore, close and save all other tasks.
- You can also Copy & Paste from Windows into WSL. In the WSL console, this often only works using the right mouse button.
- This also works from WSL to Windows by selecting the desired string and pressing
[Ctrl+c].
Check Requirements for WSL2
- Press [Windows Key] + [R].
- Type
winverand press Enter. - The Build Version must be greater than 18363.1049+.
- There are workarounds for versions 1903 and 1909 (if an update is not an option, research must be done here).
- While you're at it: Check Windows for updates and run them!
Enable WSL Feature
- Run Powershell as Administrator.
- Enter the following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable "Virtual Machine Platform" Feature
- Run Powershell as Administrator.
- Enter the following command:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart
Restart your computer to complete the WSL installation / update.
Set WSL2 as Default Version
- Run Shell as Administrator.
- Enter the following command:
wsl --set-default-version 2
Linux Kernel Update Package (Optional)
This is necessary if WSL does not start on version 2 or cannot be changed.
IMPORTANT: Check for newer versions.
- For AMD64 / x64 systems: Download and install wsl_update_x64.msi.
- For ARM64 systems: Download and install wsl_update_arm64.msi.
Download and Install Linux Distribution
- Open the Microsoft Store: https://aka.ms/wslstore
- Choose a Linux distribution (Debian 12/13 and Ubuntu 20.04 have already been tested and work).
- After clicking "Download," a login window may open. Logging in is not necessary; the window can be closed. The installation will start automatically.
- To complete the installation, the Linux distribution must be opened (via the Start menu).
- Assign a username and a password.
IMPORTANT: Write down the user and password! Do not forget them!
Multiple different distributions can be installed in parallel. A list with version and status can be retrieved with the following command in Shell:
wsl --list --verbose
For consistency, a folder should be created for future projects
In the WSL
mkdir ~/projects
For code completion, Shell Completion should be installed (in the WSL):
sudo apt install bash-completion