Skip to content
BENIBIX Learn

Windows Subsystem for Linux (WSL)

Development🖥️ Platforms & OSOperating Systems

Also known as WSL, WSL 2, WSL2

A part of Windows that runs real Linux inside it. Both run at once.

Think of it like

Think of it like a room for guests built inside your house. They live their own way, under your roof.

Example

Lucy's job gives her a Windows laptop. She runs wsl --install, restarts, and gets an Ubuntu terminal.

Why it matters

Many coding tools expect Linux. WSL lets Windows users run them and stay in Windows.

Definition

WSL is a part of Windows that runs a real Linux system inside it. You add a kind of Linux, like Ubuntu, and open its terminal. Linux tools then run on Windows with no second computer. You do not have to restart into the other system. WSL 2, the default, runs a real Linux kernel in a light virtual machine.

Example code

console
PS> wsl --install
Run it in PowerShell as admin. It sets up WSL with Ubuntu as the default.
The bottom arrow shows it. The same Ubuntu can run inside Windows through WSL.

Common mistake

Keeping project files on the Windows side and working in Linux. Tools run much faster on files kept inside the Linux side.

Key takeaways

  1. 1
    Linux inside Windows. Both systems run at the same time.
  2. 2
    Real kernel. WSL 2 runs an actual Linux kernel.
  3. 3
    Pick a distribution. Ubuntu by default, others on request.

Learn it properly