# WSL for Development — When and Why

I spent a long time going back and forth between native Windows and WSL before settling on a clear rule: **if it touches a server or a terminal, use WSL. If it talks to Windows hardware, stay native.**

## WSL or Native Windows, by Use Case

| Use Case                        | Environment        | Why                                                          |
| ------------------------------- | ------------------ | ------------------------------------------------------------ |
| Web dev (Django, Flask, Node)   | **WSL**            | Matches production. Dependencies just work.                  |
| Data Science / ML               | **WSL**            | Installing TensorFlow on native Windows is pain. WSL is not. |
| DevOps, scripting, automation   | **WSL**            | grep, sed, ssh, cron — the full Unix toolkit                 |
| Desktop GUI apps (Tkinter, Qt)  | **Windows Native** | You're building for Windows, test on Windows                 |
| Arduino / robotics              | **Windows Native** | Windows-only drivers and upload tools                        |

## The Setup: WSL 2 + Ubuntu + VS Code Remote-WSL

The magic combo is **WSL 2 + Ubuntu + VS Code with Remote-WSL extension**. You get a full Linux filesystem, native Docker, all your [terminal tools](/articles/#bash-tricks) — and VS Code just opens files from the WSL side as if they were local.

From a WSL terminal, [`code .`](https://code.visualstudio.com/docs/remote/wsl) opens the current directory in VS Code. That's it. No config, no friction.

## See Also

- [Running LLMs Locally with Ollama](/articles/running-llms-with-ollama) — GPU passthrough in WSL makes this possible
- [Oh My Zsh Plugins](/articles/oh-my-zsh-plugins) — first thing I set up in any new WSL install
- [Self-Hosting on Two Old Laptops](/articles/self-hosting-home-server) — where WSL workflows end up deploying to
- [Bash Keyboard Shortcuts](/articles/bash-keyboard-shortcuts) — essential once you're living in the terminal
