In words
What it is, why it matters, and what it is like.
Why am I learning this?
This is the foundation for everything else in your self-hosting journey. Without Linux, you cannot run Docker, containers, or any of the services you plan to host. By the end of this page, you will have a working Linux environment on your Windows or macOS machine, with the knowledge to configure it to start automatically and avoid the performance pitfalls that catch most beginners. This unlocks: installing Docker, managing containers, setting up reverse proxies, and eventually hosting your own AI models.
The idea, in plain terms
Imagine you want to run a restaurant, but your kitchen was designed for making coffee. You could renovate, but that's expensive and risky. Instead, you set up a complete second kitchen inside your existing one — a separate, self-contained space where you can cook anything, while your coffee machine stays untouched. That's what WSL and VMs do: they create a private, isolated Linux 'kitchen' inside your Windows or macOS 'coffee shop'.
Both WSL and VMs achieve the same goal — running Linux on your computer without erasing your main operating system — but they do it in fundamentally different ways. A VM is like building a full model kitchen: it simulates an entire computer, complete with its own hardware, inside your real one. It's powerful and realistic, but it's heavy — it needs to pretend to have a CPU, memory, and disk, which takes a toll on performance.
WSL (Windows Subsystem for Linux) is smarter. Instead of simulating a whole computer, it runs the Linux kernel — the core of the operating system — directly on top of Windows, sharing the same hardware. Think of it as having a special pass that lets you use the real kitchen equipment without tearing down the walls, while still keeping your coffee machine running. This makes WSL much faster and lighter than a VM, starting in seconds and using only the memory it needs.
The catch? WSL and VMs both have a 'boundary' between your main system and Linux. Files you keep inside WSL stay in a special place that Windows can see, but moving files across that boundary is slow — like carrying groceries from the coffee shop to the model kitchen every time you want to cook. This is the 'gotcha' mentioned in your notes: keep your work inside Linux, not in Windows, and you'll be fine.
An analogy
Think of WSL and VMs as different ways to run a second shop inside your existing one.
The VM is a model shop. You build a complete miniature version of a bakery inside your coffee shop — with a tiny oven, a tiny display case, and even a fake clock. It looks and works like a real bakery, but everything runs slower because it's all pretend. If you want to bake a loaf, you have to wait for the model oven to heat up, and you can't actually sell the bread — it's fake. That's a VM: it simulates hardware, so it's faithful but slow and resource-hungry.
WSL is a kitchen pass. Instead of building a model bakery, you get a special key that lets you use the actual ovens, mixers, and counters in the real bakery you share with the coffee shop. You can bake real bread, fast, using the same equipment. The downside? The bakery is right next to the coffee shop, and the door between them is narrow. If you try to carry a huge bag of flour through, it's a bottleneck — that's like copying files between Windows and WSL.
Where the analogy breaks down: In real kitchens, you can carry more flour if you make multiple trips. But in WSL, the door is fixed — the cross-boundary file access is slow regardless of how you do it, so you learn to keep your flour (your files) in the bakery (WSL) and not carry it through the door.
Another difference: the VM's model shop is fully enclosed — nothing leaks in or out. That's great for security, but it also means you need to configure everything inside it from scratch. WSL, being closer to the real hardware, shares more with Windows, which can be both a blessing (easier integration) and a curse (less isolation).
Definition
WSL and VMs are two ways to run a Linux operating system inside Windows or macOS, giving you a Linux host without needing a separate computer — WSL by running the Linux kernel directly atop your existing OS, and VMs by simulating a complete virtual computer.
Where this sits
You haven't mastered any prior concept yet — this is your starting point. But looking ahead, this page directly feeds into your self-hosting journey. The notes in your library mention that 'WSL gives a genuine Linux environment on Windows with little overhead' and that 'autostart configuration is what makes it behave like a real server' — we'll cover both here. This concept connects to your neighbouring topics: 'Containerization' (you need Linux to run Docker), 'Reverse Proxy and TLS' (your Linux host will need to run nginx eventually), and 'Tailscale Mesh Networking' (you'll want to reach your services securely, which will live on this Linux environment). After this, you'll be ready for 'Container Orchestration Basics' and 'Docker Compose', which build directly on having a working Linux host.