|$ curl https://forge-ai.dev/api/markdown?path=docs/os/wsl
Introduction
WSL (Windows Subsystem for Linux) lets developers run a Linux environment directly on Windows without managing a full virtual machine. It is the recommended way to use Linux tools on Windows.
Installation
wsl-install.ps1
POWERSHELL
| 1 | wsl --install |
| 2 | wsl --install -d Debian |
| 3 | wsl --set-default-version 2 |
Daily Workflow
wsl-workflow.sh
Bash
| 1 | # Enter WSL |
| 2 | wsl |
| 3 | |
| 4 | # Open current directory in VS Code |
| 5 | code . |
| 6 | |
| 7 | # Keep projects in the Linux filesystem |
| 8 | cd /home/$USER/projects |
| 9 | |
| 10 | # Access Windows files when needed |
| 11 | ls /mnt/c/Users/Alice/Documents |
⚠
warning
Store project files inside the WSL filesystem (e.g., /home/<user>/projects) for the best I/O performance. Avoid running Linux build tools on files stored in /mnt/c.
See Also
For a deeper guide, see Linux / WSL.