๐ŸŒ Detecting your locationโ€ฆ
๐Ÿ“ข Advertisement โ€” Configure AdSense in Appearance โ†’ Customize โ†’ AdSense Settings

WSL2 Complete Setup Guide 2026: Linux unter Windows richtig

โฑ๏ธ2 min read  ยท  390 words
WSL2 Complete Setup Guide 2026: Linux on Windows the Right Way

WSL2(Windows-Subsystem fรผr Linux 2) fรผhrt einen vollstรคndigen Linux-Kernel in Windows 11 mit nahezu nativer Leistung aus. Im Jahr 2026 ist WSL2 die Standardentwicklungsumgebung fรผr Windows-Entwickler, die Python, Node, Docker und Cloud-Tools verwenden.

Installieren Sie WSL2

ร–ffnen Sie PowerShell als Administrator und fรผhren Sie einen Befehl aus. Windows installiert WSL2 + Ubuntu automatisch.

# Install WSL2 with Ubuntu (default)
wsl --install

# Choose specific distro
wsl --install -d Ubuntu-24.04

# List available
wsl --list --online

Nach der Installation neu starten. ร–ffnen Sie Ubuntu รผber Start, legen Sie Benutzernamen und Passwort fest.

Aktualisieren und installieren Sie Essentials

sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential curl git wget unzip

# Python 3.12
sudo apt install -y python3.12 python3.12-venv python3-pip

# Node.js 22 via nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 22 && nvm use 22

Konfigurieren Sie Git

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global core.autocrlf input
git config --global init.defaultBranch main

# SSH key for GitHub
ssh-keygen -t ed25519 -C "you@example.com"
cat ~/.ssh/id_ed25519.pub  # add to GitHub Settings > SSH Keys

Docker in WSL2

Installieren Sie Docker Desktop unter Windows und aktivieren Sie die WSL2-Integration. Oder installieren Sie Docker Engine direkt in WSL2.

# After Docker Desktop WSL2 integration enabled:
docker --version
docker run hello-world

# Or install Docker Engine directly
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker

Auf Windows-Dateien zugreifen

# C: drive at /mnt/c
ls /mnt/c/Users/YourName/Desktop

# Navigate to Windows project
cd /mnt/c/Users/YourName/Projects/myapp

# Open VS Code from WSL2
code .

# Open Windows Explorer from WSL2
explorer.exe .

Optimieren Sie die WSL2-Leistung

Erstellen Sie%USERPROFILE%.wslconfigin Windows, um die RAM- und CPU-Auslastung zu begrenzen.

[wsl2]
memory=8GB
processors=4
swap=2GB
localhostForwarding=true

# Apply new config
wsl --shutdown
# Reopen Ubuntu

WSL2 und VS-Code

Installieren SieWSL-Erweiterungim VS-Code. Fรผhren Siecode .aus aus einem beliebigen WSL2-Ordner. VS Code fรผhrt seinen Server unter Linux aus โ€“ vollstรคndiges IntelliSense und Debugging unter Linux.

Fazit

WSL2 macht Dual-Boot รผberflรผssig. Da Docker, VS Code und Git nativ unter Linux unter Windows ausgefรผhrt werden, erhalten Sie das Beste aus beiden Welten. Richten Sie es einmal ein und Sie werden nie mehr zurรผckblicken.

โœ๏ธ Leave a Comment

Your email address will not be published. Required fields are marked *

๐ŸŒ Read in:๐Ÿ‡ฌ๐Ÿ‡ง English๐Ÿ‡ฉ๐Ÿ‡ช Deutsch๐Ÿ‡ง๐Ÿ‡ท Portuguรชs๐Ÿ‡ธ๐Ÿ‡ฆ ุงู„ุนุฑุจูŠุฉ๐Ÿ‡ฎ๐Ÿ‡ณ เคนเคฟเคจเฅเคฆเฅ€๐Ÿ‡ง๐Ÿ‡ฉ เฆฌเฆพเฆ‚เฆฒเฆพ