Skip to content

Guide · Open source

How to use WSL: install Linux on Windows and run its tools

Updated · written with AI from the project's own documentation and checked against our catalogue data

WSL, the Windows Subsystem for Linux, lets you run Linux command-line tools, utilities and applications directly on Windows. According to the project README, it does this without the overhead of a traditional virtual machine or a dual-boot setup. This guide explains what WSL is for, how to install it with the wsl --install command, and what to check before you rely on it.

WSLmicrosoft/WSL · ★ 34.3k · MIT

Quick start

  1. 1Check your Windows setup. Confirm you are on Windows and can open the Windows command line where the wsl command is available.
  2. 2Open the command line. Open the Windows command line on your PC.
  3. 3Run the install command. Type wsl --install and run it, as the README describes.
  4. 4Read the setup guidance. Open Microsoft's WSL setup and overview documentation at aka.ms/wsldocs for best practices.
  5. 5Review telemetry settings. Read the repository's data and privacy documentation and turn telemetry off if you prefer.

What WSL is and when it makes sense

WSL runs Linux tools on a Windows machine, so you can keep Windows as your main system and still use a Linux command line. The README describes the goal as running your Linux command-line tools, utilities and applications unmodified and directly on Windows.

This suits people who need Linux-only tools for development or scripting, students learning Linux on a Windows PC, and anyone who wants to avoid dual-booting or running a full virtual machine.

  • Windows users who want a Linux command line for development or scripting
  • Developers who need Linux-only tools while staying on Windows
  • Students learning Linux on a Windows machine
  • People who want to avoid dual-booting or running a full virtual machine

What you need before you install WSL

The main prerequisite is Windows with the wsl command available. The installation command is run from the Windows command line, so you will need access to it on your machine.

WSL runs inside Windows, so it is not a fit if you want a native Linux desktop or no Windows at all.

Install WSL with wsl --install

Open the Windows command line and run the command below. The README says this is how you install WSL right away.

The README links to Microsoft's setup guidance on best practices for setup, which is worth reading if you want more detail on the environment.

wsl --install

Use WSL and learn more from the official docs

The README points to Microsoft's official WSL documentation for setup, overviews and background. The repository itself holds the Windows-side code, so the documentation is the best place to learn day-to-day usage.

Related open source repositories cover the Linux kernel shipped with WSL, support for Linux GUI apps in WSL, and the documentation source. Docs are at aka.ms/wsldocs and the project homepage is wsl.dev.

  • WSL2-Linux-Kernel: the Linux kernel shipped with WSL
  • WSLg: support for Linux GUI apps in WSL
  • microsoftdocs/wsl: WSL documentation

Understand telemetry before you install

The README says the application logs basic diagnostic data (telemetry). It also says the software may send information about your use to Microsoft, and that you may turn telemetry off as described in the repository. Read the repository's data and privacy documentation if this matters to you.

If you object to built-in diagnostic telemetry, check the repository instructions for turning it off before you rely on WSL.

Know the limits of the source docs

Some detailed error output from wslc.exe is not fully localized, because it uses lower-level open source libraries. The README says these unlocalized strings are kept to give more failure context. Expect some English error text even on a localized system.

The developer docs cover building WSL from source and its architecture. They assume C++ and Windows build experience, so they are not a beginner's guide to using WSL.

What people use it for

  • Running Linux command-line tools for software development on a Windows PC
  • Scripting with Linux utilities without setting up a virtual machine
  • Learning Linux commands on a Windows machine as a student
  • Using Linux-only tools while keeping Windows as the main operating system

Frequently asked questions

How do I install WSL?

The README says to run wsl --install inside the Windows command line. Follow it with Microsoft's setup guidance at aka.ms/wsldocs for best practices.

Is WSL free?

The repository is released under the MIT licence, which the README lists. Check the licence file in the repository for the full terms.

What do I need to run WSL?

You need Windows with the wsl command available. The install command is run from the Windows command line.

Is WSL a virtual machine?

The README says WSL runs Linux tools without the overhead of a traditional virtual machine or dual-boot setup. It runs inside Windows.

How does WSL compare to Docker Desktop, VirtualBox or Multipass?

Docker Desktop, VirtualBox and Multipass are listed as comparable projects in this directory. WSL's stated goal is running Linux tools directly on Windows without a traditional VM, so pick based on whether you need that or a separate virtual machine.

Does WSL send data to Microsoft?

The README says the application logs basic diagnostic data (telemetry) and that the software may send information about your use to Microsoft. It says you may turn telemetry off as described in the repository.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

WSL suits Windows users who want a Linux command line or Linux-only tools without dual-booting or running a full virtual machine. Skip it if you need a native Linux desktop, have no Windows at all, or object to the default diagnostic telemetry.

Install options & downloads