How to Install WSL in Windows 11: A Step-by-Step Guide

If you want to use Linux tools without leaving Windows 11, learning how to install WSL in Windows 11 is one of the easiest ways to get started.

Windows Subsystem for Linux, commonly called WSL, lets you run a GNU/Linux environment directly inside Windows. You can use Linux shells, command-line tools, programming languages, package managers, development utilities, and many Linux applications without setting up a traditional dual-boot system or a conventional virtual machine.

And here’s the best part: installing WSL doesn’t have to be complicated.

For most Windows 11 users, a single command can handle the majority of the setup. Microsoft provides wsl --install specifically to simplify the installation process.

In this guide, we’ll explain how to install WSL in Windows 11 step by step, how to choose a Linux distribution, how to create your Linux username and password, how to verify that WSL 2 is running, and how to troubleshoot common installation problems.

Table of Contents

What Is WSL in Windows 11?

WSL stands for Windows Subsystem for Linux.

It allows you to run a Linux environment alongside Windows rather than replacing Windows with Linux.

Think of it as having a Linux workspace inside your Windows computer.

You can open a Linux terminal, run commands such as ls, cd, grep, sudo, and apt, install development packages, work with Git repositories, and interact with Windows files—all from the same PC.

Microsoft describes WSL as a way to run a GNU/Linux environment and many Linux command-line tools directly on Windows without the overhead of a traditional virtual machine or dual-boot setup.

Why Should You Install WSL on Windows 11?

WSL is particularly useful if you’re a:

  • Software developer
  • Web developer
  • Python programmer
  • Linux learner
  • System administrator
  • DevOps learner
  • Data scientist
  • Open-source contributor
  • Student learning Linux

You can use Windows for everyday applications while keeping a Linux environment available whenever you need it.

For example, you might write code in Windows and execute Linux commands through WSL. You can also connect development tools such as Visual Studio Code to your WSL environment. Microsoft provides an official WSL workflow for using VS Code with Linux projects.

What Do You Need Before Installing WSL?

The requirements are relatively simple.

Microsoft’s current wsl --install documentation supports Windows 11, as well as Windows 10 version 2004 and later with the required build number.

For Windows 11 users, make sure:

  • Windows 11 is installed and updated.
  • You have administrator access.
  • Your computer has an internet connection.
  • Virtualization capabilities are available for WSL 2.
  • You have enough storage for the Linux distribution and your projects.

You don’t normally need to manually download a Linux kernel when using the modern installation command because WSL handles the necessary components.

WSL 1 vs. WSL 2: Which One Should You Use?

Before installing Linux, you may wonder about WSL 1 and WSL 2.

The important difference is that WSL 2 uses an actual Linux kernel, while WSL 1 uses a translation layer. Microsoft describes WSL 2 as providing the benefits of WSL 1 while using a real Linux kernel.

Feature WSL 1 WSL 2
Linux kernel Translation layer Actual Linux kernel
Compatibility Good for many command-line tools Broader Linux compatibility
Default for modern installation No Yes
Virtualization technology Different architecture Uses virtualization
Recommended starting point Usually not Usually

For a new Windows 11 installation, WSL 2 is generally the natural starting point because Microsoft’s current installation workflow sets it as the default.

How Do You Check Your Windows 11 Version?

Before installing WSL, it’s useful to confirm that you’re running Windows 11.

Press:

Windows + R

Type:

winver

Press Enter.

A window will show your Windows version and build information.

If you’re already running Windows 11, you can proceed with the modern WSL installation process.

Step 1: Open PowerShell as Administrator

The easiest installation method uses PowerShell.

Open the Start menu and search for:

PowerShell

Right-click Windows PowerShell or the available PowerShell application and choose:

Run as administrator

You may see a User Account Control prompt.

Select Yes if you want to continue.

You should now have an elevated PowerShell window.

Why Do You Need Administrator Access?

WSL installation needs to enable Windows components and make system-level changes.

Running PowerShell as administrator gives the installation command the permissions it needs.

Step 2: Run the WSL Installation Command

In the administrator PowerShell window, enter:

wsl --install

Then press Enter.

That’s it.

This command is designed to automate several parts of the WSL setup process. Microsoft says the command enables the required WSL and Virtual Machine Platform components, downloads and installs the Linux kernel, sets WSL 2 as the default, and installs Ubuntu by default.

This is much easier than the older manual installation process.

Step 3: Restart Your Windows 11 PC

The WSL installation may require a restart.

If Windows asks you to restart, save your work and reboot the computer.

This allows Windows to complete the changes to its optional components.

Don’t worry if the installation isn’t completely finished before the restart. A reboot is a normal part of the setup process.

Step 4: Launch Your Linux Distribution

After restarting, Windows may continue the WSL installation automatically.

If Ubuntu doesn’t open automatically, search the Start menu for the installed Linux distribution.

By default, wsl --install installs Ubuntu unless you specify another distribution.

The first launch can take a little longer because Windows needs to initialize the Linux distribution.

You’ll eventually see a Linux terminal window.

Step 5: Create Your Linux Username

The first time your Linux distribution launches, you’ll be asked to create a Linux user account.

Choose a username you’ll remember.

For example:

alex

This account is separate from your normal Windows account.

That’s an important detail.

Your Windows username and your Linux username don’t have to be the same.

Step 6: Create a Linux Password

Next, you’ll be asked to create a password.

Enter a secure password and remember it.

One slightly confusing thing for beginners is that Linux normally doesn’t display characters while you’re typing a password in the terminal.

You might type:

mypassword

and see nothing on screen.

That’s normal.

Linux is still receiving your keystrokes.

Press Enter when you’re finished.

Microsoft’s WSL installation documentation confirms that you need to create a username and password for the newly installed Linux distribution.

Step 7: Verify That WSL Is Installed

Once you’ve completed the Linux account setup, open PowerShell or Command Prompt.

Run:

wsl --status

This can provide information about the current WSL configuration.

You can also list installed distributions with:

wsl --list --verbose

Microsoft documents wsl.exe --list --verbose as the command for seeing installed distributions and their WSL version.

You may see something similar to:

NAME STATE VERSION
Ubuntu Running 2

If the version shows 2, you’re running WSL 2.

Step 8: Check Which Linux Distributions Are Available

Ubuntu is installed by default with the basic wsl --install command, but you aren’t limited to Ubuntu.

To see available distributions, run:

wsl --list --online

Microsoft documents this command for displaying distributions that can be installed through the available online sources.

Depending on what’s currently available, you may see distributions such as:

  • Ubuntu
  • Debian
  • Kali Linux
  • openSUSE
  • Other supported distributions

The exact list can change over time.

Step 9: Install a Different Linux Distribution

Suppose you don’t want Ubuntu.

You can specify another distribution using:

wsl --install -d <DistributionName>

For example, if Debian is listed as an available distribution, you can use:

wsl --install -d Debian

Microsoft documents the -d option for selecting a distribution other than the default Ubuntu installation.

Always use the exact distribution name shown by:

wsl --list --online

That prevents spelling mistakes and invalid distribution-name errors.

Step 10: Update WSL

After installation, keeping WSL updated is a good idea.

You can update WSL with:

wsl --update

Microsoft provides this command as part of its current WSL command set.

Updating WSL can provide newer fixes and improvements.

If you prefer to check what version is installed before updating, use:

wsl --version

The exact output depends on the WSL version installed on your system.

Step 11: Update Ubuntu Packages

Once you’re inside Ubuntu, you should update the Linux package information.

Run:

sudo apt update

Then you can upgrade installed packages with:

sudo apt upgrade

Microsoft’s Linux tutorial also uses sudo apt update as the starting point for updating the Ubuntu software package list.

You may be asked for your Linux password.

Remember that the password won’t visibly appear while you type it.

Step 12: Learn Basic WSL Commands

You don’t need to memorize dozens of commands immediately.

Start with a few essentials.

Check Your Current Directory

Use:

pwd

This shows your current location.

List Files

Use:

ls

This displays files and folders.

Move Into a Folder

Use:

cd folder-name

Move Up One Directory

Use:

cd ..

Return to Your Linux Home Folder

Use:

cd ~

Clear the Terminal

Use:

clear

These basic commands will quickly make the Linux environment feel less mysterious.

How Do You Access Windows Files From WSL?

One of the most useful WSL features is the ability to work with Windows files.

Windows drives are commonly mounted under /mnt.

For example, the Windows C: drive is generally accessible at:

/mnt/c

You can navigate there with:

cd /mnt/c

Then use:

ls

to view the contents.

This makes it possible to work between Windows and Linux environments.

However, for Linux-heavy development workflows, Microsoft recommends thinking carefully about where you store project files because file-system performance can vary depending on whether you’re working inside the Linux filesystem or through mounted Windows paths.

How Do You Run Linux Commands From Windows?

You don’t always have to open the Linux terminal first.

From PowerShell or Command Prompt, you can run WSL commands using:

wsl

For example:

wsl pwd

The command sends the operation into your default Linux distribution.

Microsoft’s WSL command documentation explains that WSL commands can be run from PowerShell or Windows Command Prompt.

This makes WSL feel much more integrated into Windows than a completely separate operating system.

How Do You Choose the Default Linux Distribution?

If you have several distributions installed, you can choose which one should launch when you simply type:

wsl

First, list your installed distributions:

wsl --list

Then set the default with:

wsl --set-default <DistributionName>

For example:

wsl --set-default Debian

Microsoft documents wsl --set-default for selecting the distribution used by the standard wsl command.

How Do You Set WSL 2 as the Default Version?

If you’re installing multiple Linux distributions and want new installations to use WSL 2, run:

wsl --set-default-version 2

Microsoft documents this command for setting the default WSL version for newly installed distributions.

For modern Windows 11 installations, WSL 2 is already the default when using the standard installation command.

How Do You Check Whether a Distribution Uses WSL 1 or WSL 2?

Run:

wsl --list --verbose

You’ll see a VERSION column.

For example:

Distribution State Version
Ubuntu Running 2
Debian Stopped 2

If the version is 1, that distribution is using WSL 1.

If it’s 2, it’s using WSL 2.

How Do You Convert a Distribution to WSL 2?

If a distribution is currently using WSL 1, you can convert it with:

wsl --set-version <DistributionName> 2

For example:

wsl --set-version Ubuntu 2

The conversion can take some time depending on the size of the Linux environment.

Don’t shut down the computer while the conversion is running.

Afterward, verify the result with:

wsl --list --verbose

How Do You Install WSL Without the Microsoft Store?

Most Windows 11 users can use the standard wsl --install process.

However, Microsoft also documents other installation methods, including offline installation and manual installation approaches for situations where the Microsoft Store isn’t suitable or available.

For example, Microsoft documents an offline workflow involving the WSL MSI package, enabling Virtual Machine Platform, and installing a distribution from a .wsl file.

For beginners, however, the normal wsl --install approach is much simpler.

How Do You Install WSL Manually?

Manual installation is mainly useful when the automatic installation doesn’t work or you’re working with a configuration where the standard method isn’t available.

The older manual process involves:

  1. Enabling the Windows Subsystem for Linux feature.
  2. Enabling Virtual Machine Platform.
  3. Restarting Windows.
  4. Installing the appropriate WSL kernel package when required.
  5. Setting WSL 2 as the default.
  6. Installing a Linux distribution.
  7. Creating the Linux user account.

Microsoft still documents these manual steps for older Windows builds and special cases.

For a normal, updated Windows 11 PC, start with the modern installation command before attempting the longer manual method.

How Do You Fix “wsl –install” Not Working?

Sometimes you enter:

wsl --install

and don’t get the expected installation behavior.

Microsoft notes that if WSL is already installed, running wsl --install can display help text rather than installing everything again. In that situation, you can check available distributions with:

wsl --list --online

and then install one using:

wsl --install -d <DistroName>

Microsoft also documents --web-download as an option when an installation is stuck at 0.0%.

What If WSL Installation Gets Stuck?

If installation appears stuck, don’t immediately start changing random Windows features.

Try these steps:

  1. Wait a little longer.
  2. Check your internet connection.
  3. Restart Windows.
  4. Open PowerShell as administrator.
  5. Run wsl --update.
  6. Check the available distributions.
  7. Try the --web-download option if appropriate.
  8. Check Microsoft’s current WSL troubleshooting documentation.

Microsoft specifically documents wsl --install --web-download -d <DistroName> as an alternative when distribution installation gets stuck at 0.0%.

How Do You Fix WSL 2 Virtualization Problems?

WSL 2 relies on virtualization capabilities.

If WSL 2 refuses to start, check whether hardware virtualization is enabled in your computer’s firmware.

The exact setting name varies by manufacturer.

You may see terminology related to:

  • Virtualization Technology
  • Intel VT-x
  • AMD-V
  • SVM
  • CPU virtualization

Don’t change unrelated firmware settings.

If virtualization is already enabled and WSL still reports an error, investigate the exact error message rather than guessing.

Microsoft’s older manual WSL documentation specifically identifies Virtual Machine Platform as a required component for WSL 2.

How Do You Use WSL With Visual Studio Code?

WSL becomes especially useful when paired with a development editor.

Microsoft provides an official workflow for using Visual Studio Code with WSL. The recommended approach is to install VS Code on Windows and use the WSL extension to work with projects inside the Linux environment.

This lets you combine:

  • Windows desktop applications
  • Linux development tools
  • Git
  • Bash
  • Programming languages
  • VS Code
  • Linux package managers

It’s like having two toolboxes on the same desk.

You don’t have to choose Windows or Linux for every task.

Can WSL Run Linux GUI Applications?

Modern WSL can support Linux GUI applications as part of the WSL environment.

This expands WSL beyond simply opening a terminal.

However, whether a particular Linux graphical application works correctly depends on the application and your system configuration.

For most beginners, it’s best to start with command-line applications before experimenting with more advanced GUI workflows.

How Do You Shut Down WSL?

You can shut down all running WSL distributions with:

wsl --shutdown

This stops the WSL virtual machine environment.

It’s useful when troubleshooting or when you want to completely stop WSL activity.

You can then launch your distribution again from the Start menu or by running:

wsl

How Do You Restart a WSL Distribution?

You can stop a specific distribution with:

wsl --terminate <DistributionName>

For example:

wsl --terminate Ubuntu

Then start it again by launching Ubuntu or running:

wsl -d Ubuntu

Microsoft documents commands for controlling individual distributions and the WSL environment in its basic command reference.

Frequently Asked Questions

1. Is WSL free on Windows 11?

Yes. WSL is a Windows feature, and Microsoft provides the WSL installation mechanism directly through Windows. Individual Linux distributions can have their own licensing or distribution arrangements.

2. Does WSL replace Windows?

No. WSL runs a Linux environment alongside Windows. You don’t need to remove Windows or create a traditional dual-boot configuration.

3. Is WSL 2 better than WSL 1?

WSL 2 uses an actual Linux kernel and is the default for Microsoft’s modern installation workflow. For a new Windows 11 setup, WSL 2 is generally the natural starting point.

4. Which Linux distribution does WSL install by default?

The standard wsl --install command installs Ubuntu by default. You can select another supported distribution using the -d option.

5. Can I install multiple Linux distributions with WSL?

Yes. WSL supports multiple distributions. You can install additional distributions, run them individually, and select which one should be the default.

Conclusion

Learning how to install WSL in Windows 11 is much easier than it used to be.

For most users, the process begins with opening PowerShell as an administrator and running:

wsl --install

Microsoft’s modern installation command handles the major components automatically, installs Ubuntu by default, and configures WSL 2 as the default.

After restarting your computer, you’ll create a Linux username and password and can immediately begin experimenting with Bash and Linux commands.

From there, you can install additional distributions, update WSL, connect WSL to Visual Studio Code, work with Git, install Linux packages, and build a powerful development environment without leaving Windows.

If you’re completely new to Linux, don’t try to learn everything at once. Start with commands such as pwd, ls, cd, and sudo apt update. Once those become familiar, explore more advanced WSL features.

The beauty of WSL is its flexibility: Windows remains your primary desktop while Linux becomes another powerful tool available whenever you need it.

Summary: Key Takeaways

  • WSL lets you run a Linux environment directly alongside Windows 11.
  • Microsoft recommends wsl --install as the simplest modern installation method.
  • The command enables required components and installs WSL 2 and Ubuntu by default.
  • You need administrator access to perform the standard installation.
  • A restart may be required.
  • Create a Linux username and password when the distribution launches for the first time.
  • Use wsl --list --online to see available distributions.
  • Use wsl --install -d <DistributionName> to install a specific distribution.
  • Use wsl --list --verbose to check whether a distribution is running WSL 1 or WSL 2.
  • Use wsl --update to update WSL.
  • Use wsl --set-default-version 2 to make WSL 2 the default for new distributions.
  • You can access Windows drives through paths such as /mnt/c.
  • WSL works well with development tools such as Visual Studio Code.
  • If automatic installation fails, Microsoft provides manual and offline installation methods.
  • For most current Windows 11 systems, start with the simple wsl --install method before attempting manual configuration.