Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

WSL – Windows Subsystem for Linux Cheat Sheet

WSL – Windows Subsystem for Linux Cheat Sheet

Back to Operating Systems and CLI
Updated 2026-05-20
Next Topic: Zsh and Oh-My-Zsh Shell Configuration Cheat Sheet

WSL (Windows Subsystem for Linux) allows running a full Linux environment natively on Windows — no virtual machine overhead, no dual boot. WSL2 replaced the original syscall-translation layer of WSL1 with a genuine Linux kernel inside a lightweight Hyper-V Micro-VM, gaining full system call compatibility, systemd support, Docker, GPU compute, and 2–20× faster native Linux file I/O. The single most important practical tip: always keep project files inside the WSL file system (not under /mnt/c) — cross-filesystem access through the OS boundary carries a severe performance penalty that WSL1 users rarely hit. Since May 2025 the WSL source code is open on GitHub, and WSL ships updates through the Microsoft Store independently of Windows OS releases.

What This Cheat Sheet Covers

This topic spans 14 focused tables and 116 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: WSL1 vs WSL2 ArchitectureTable 2: Installation and Distribution SetupTable 3: Distribution Lifecycle ManagementTable 4: File System Interoperability and \\wsl$ PathsTable 5: Per-Distribution Configuration (wsl.conf)Table 6: Global Configuration (.wslconfig)Table 7: Networking Modes and ConfigurationTable 8: systemd SupportTable 9: GUI Applications (WSLg)Table 10: Disk and Storage ManagementTable 11: Interoperability — Cross-platform CommandsTable 12: USB Devices (usbipd-win)Table 13: GPU Acceleration (ML Compute and GUI)Table 14: Performance Tips, Gotchas, and Common Pitfalls

Table 1: WSL1 vs WSL2 Architecture

The core architectural split: WSL1 translates Linux syscalls into Windows NT calls with no real kernel, while WSL2 runs a genuine Linux kernel in a Hyper-V Micro-VM. This single difference explains nearly every feature and performance difference between the two versions.

TypeExampleDescription
WSL1 (syscall translation)
wsl --set-version Ubuntu 1
Translates Linux syscalls to Windows NT calls via a compatibility layer; no real Linux kernel, lower startup overhead, faster cross-OS file access
WSL2 (Hyper-V Micro-VM)
wsl --set-version Ubuntu 2
Runs a full Linux kernel in a lightweight managed VM; full syscall compatibility, faster native Linux I/O, supports Docker and systemd
Full system call compatibility
Docker, snap, eBPF in WSL2
WSL2 supports 100% of Linux syscalls; WSL1 covers only a translation subset — some apps (Docker, snap) simply won't run on WSL1
Native Linux file I/O performance
npm install in ~/project vs /mnt/c/project
WSL2 is 2–20× faster for file-intensive operations when files live in the Linux VHD; WSL1 is faster for accessing files on the Windows FS (/mnt/c)

More in Operating Systems and CLI

  • Windows Server 2025 Cheat Sheet
  • Zsh and Oh-My-Zsh Shell Configuration Cheat Sheet
  • AWS CLI Cheat Sheet
  • File Permissions Cheat Sheet
  • Linux Package Management Cheat Sheet
  • System Monitoring Cheat Sheet
View all 31 topics in Operating Systems and CLI