Skip to content
Follow
Windows 🟡 Intermediate

How To Enable And Configure WSL (Windows Subsystem For Linux) On Windows 11

Richard
Written by
Richard
Aug 16, 2026 10 min read
How to Enable and Configure WSL (Windows Subsystem for Linux) on Windows 11
How to Enable and Configure WSL (Windows Subsystem for Linux) on Windows 11

Windows Subsystem for Linux (WSL) is a built-in Windows 11 feature that lets you run Linux command-line tools and apps right alongside your normal Windows programs, without needing a slow virtual machine. Instead of restarting your PC or setting up a separate computer, WSL runs a full Linux environment directly inside Windows 11 using very little memory.

Setting up WSL takes just a few clicks in PowerShell, and it gives you instant access to popular Linux tools, programming languages, and file systems. Whether you are learning to code or need Linux for work, you can turn on WSL and get your first Linux distribution running in minutes.

⚡ Quick Answer

Open Windows PowerShell as an administrator, type wsl –install, press Enter, and restart your computer to enable and configure the Windows Subsystem for Linux on Windows 11. This single command turns on the required system features, downloads the default Linux environment, and gets your setup ready to use.

What is the Windows Subsystem for Linux (WSL)?

Windows Subsystem for Linux (WSL) is a built-in Windows 11 feature that lets you run real Linux software directly on your PC without needing a separate computer or complex virtual machine. It acts as a translator between Windows and Linux so you can use command-line tools, scripts, and open-source applications side by side with your regular Windows apps.

When you use the Windows Subsystem for Linux, you can open a terminal window and run genuine Linux commands, scripts, and programming languages like Python, Node.js, and Docker. You do not need to reboot your computer or install heavy virtual machine software to run the Windows Subsystem for Linux. Your Linux files live right inside your normal Windows file explorer , making it simple to edit code in Windows and run that code in Linux.

The latest version, WSL 2, includes a real Linux kernel built right into Windows. This gives you amazing speed, full system compatibility, and great performance. Whether you want to learn programming, test websites, or run powerful developer tools, WSL is the best way to bridge the gap between Windows and Linux.

Prerequisites for Running WSL on 🪟 Windows 11

WSL prerequisites on Windows 11 require a modern PC running Windows 11 version 21H2 or higher, along with hardware virtualization turned on in your computer’s BIOS settings. Most computers purchased in recent years meet these system requirements automatically, but you can quickly check your version by opening your system settings.

First, verify that your computer runs Windows 11 by pressing the Windows Key, typing About your PC, and pressing Enter. Look for the Windows specification section to confirm you are running Windows 11.

📝Good to Know
Second, your computer's processor must have hardware virtualization turned on. Hardware virtualization is a special setting inside your computer’s main processor chip that lets the computer run multiple operating systems at the same time. Most modern computers have hardware virtualization enabled by default, but if you run into errors during setup, you may need to turn hardware virtualization on inside your computer's BIOS or UEFI settings menu.

How to Enable and Install WSL on 🪟 Windows 11

Installing WSL on Windows 11 requires far fewer steps than it once did. Microsoft provides a single command that turns on all required features and downloads a Linux system automatically.

Method 1The Quick Install Command

Installing WSL with a single command in Windows PowerShell is the fastest method for most users to set up their Linux environment. You simply open PowerShell with administrator rights, type the quick install command, and let Windows automatically download and configure all the necessary files for you.

  1. Press the Windows Key on your keyboard.
  2. Type PowerShell in the search bar.
  3. Right-click on Windows PowerShell in the search results and choose Run as administrator. [Requires administrator privileges]
  4. When a window pops up asking if you want to allow this app to make changes to your device, click Yes.
  5. Type the exact command into the window:
    💻Code
    wsl --install
  6. Press Enter to run it.
  7. Wait for the process to download the necessary files and turn on the required Windows features.
  8. Restart your computer when the installation finishes to make sure all changes take effect.

Method 2Turning on Windows Features Manually

Enabling Windows features manually for WSL lets you set up the subsystem using graphical menus instead of typing commands in PowerShell. You can open the Windows features window from your control panel settings, check the boxes for virtual machine support and Linux features, and restart your computer to apply the changes.

  1. Press the Windows Key, type Turn Windows features on or off, and press Enter. [Requires administrator privileges]
  2. A small window will appear with a long list of checkboxes. Scroll down and look for Virtual Machine Platform. Check the box next to it.
  3. Look for Windows Subsystem for Linux further down the list and check that box as well.
  4. Click the OK button at the bottom of the window.
  5. Windows will search for the files and apply the changes. Click the Restart now button to reboot your computer.

Choosing and Installing a Linux Distribution

Choosing a Linux distribution for WSL involves picking a specific flavor of the operating system, such as Ubuntu, Debian, or Fedora, to run on your Windows computer. Ubuntu is installed by default with the main setup command, but you can easily pick a different option depending on what tools or software you plan to use.

By default, the wsl --install command usually installs Ubuntu. If you want to install a different distribution or add more than one, you can use the Microsoft Store or the command line.

Installing via the Microsoft Store

Installing Linux distributions via the Microsoft Store is a simple way to add environments like Ubuntu to your Windows 11 computer. You just open the store app, search for your preferred Linux version, and click the install button to download it directly to your machine.
  1. Open the Microsoft Store app from your Windows start menu or taskbar.
  2. Type Linux or the name of the specific distribution you want (such as Ubuntu) into the search bar.
  3. Click on the distribution you want to install.
  4. Click the Get or Install button. The Microsoft Store will download and install the Linux system for you.

Setting Up Your Linux User Account

Setting up your Linux user account in WSL happens the very first time you launch your new distribution after installation. The terminal will ask you to type a simple lowercase username and create a secure password to protect your files and manage administrative tasks.

  1. Type a new username (usually your first name or a simple handle) and press Enter. Note that your username must use lowercase letters.
  2. Type a secure password and press Enter. As you type your password, no characters or dots will appear on the screen. This is a normal security feature in Linux to keep your password hidden from prying eyes. Just type your password carefully and press Enter.
  3. Retype the same password to confirm it and press Enter.

Once your account is created, you will see a command prompt welcoming you to your new Linux environment. You are now ready to run Linux commands!

How to Check Your WSL Version and Upgrade to WSL 2

It is important to make sure your Linux distributions are running WSL 2, which is much faster and offers full system compatibility compared to the older WSL 1.

Checking Your Current Version

You can easily check which version of WSL your installed Linux distributions are using.

  1. Open Windows PowerShell or the Command Prompt.
  2. Type the command:
    💻Code
    wsl -l -v
  3. Press Enter.

A list will appear showing your installed Linux distributions and the version number (1 or 2) next to each one.

Upgrading from WSL 1 to WSL 2

Upgrading from WSL 1 to WSL 2 gives you better performance, complete system call compatibility, and faster file speeds using a quick command in PowerShell. You simply open PowerShell as an administrator, target your specific Linux distribution name, and run the version update command.

  1. Open Windows PowerShell as an administrator. [Requires administrator privileges]
  2. Type the command, replacing DISTRO-NAME with the actual name of your Linux distribution (for example, Ubuntu):
    💻Code
    wsl --set-version DISTRO-NAME 2
  3. Press Enter.

Wait for the conversion process to finish. This may take a few minutes depending on how many files you have in your Linux system.

You can set Windows Subsystem for Linux version 2 as your default setting for all future Linux installations so that new setups automatically use the best performance and compatibility. To do this, you just need to open your command prompt and run the command `wsl --set-default-version 2`. Setting this default saves you time because you will not need to upgrade every new Linux distribution manually after you download it from the Microsoft Store.

Managing multiple Linux distributions in WSL (Windows Subsystem for Linux) allows you to install and run up to 32 different versions of Linux on the same Windows 11 computer at the same time. You can view all your installed Linux environments, switch between the environments easily, and use separate Linux systems for different coding projects or testing tasks.

To see all the Linux distributions currently installed on your computer, open PowerShell and type:

💻Code
wsl --list --all

If you have more than one distribution installed, Windows chooses one as your default. When you open WSL from your start menu, it opens your default distribution. You can change your default distribution by running this command in PowerShell:

💻Code
wsl --setdefault DISTRO-NAME

Replace DISTRO-NAME with the exact name of the distribution you want to use as your main system.

Advanced Configuration: Managing WSL Settings with .wslconfig

Configuring advanced Windows Subsystem for Linux settings with a .wslconfig file lets you control how much computer memory, processor power, and hard drive space the Linux subsystem can use. By creating this simple text file in your Windows user folder, you can set global resource limits to keep your computer running smoothly.

The .wslconfig file applies settings globally to all Linux distributions running on your computer. Here is how to set it up:

  1. Open your standard Windows Notepad application.
  2. Copy and paste the sample settings into Notepad:
    💻Code
    memory=4GB
    processors=2
    swap=2GB
    localhostForwarding=true
  3. Click File and then Save As.
  4. Navigate to your main Windows user folder (usually located at C:\Users\USERNAME).
  5. Name the file exactly .wslconfig (make sure to include the dot at the beginning) and set the save type to All Files (*.*).
  6. Click Save.

These settings limit WSL to using 4 gigabytes of memory and 2 processor cores, ensuring your Windows computer stays fast and responsive while you run Linux tools.

Expert Tips for Getting the Most Out of WSL

Now that your WSL environment is running smoothly, here are a few expert tips to help you work faster and smarter on Windows 11.

Accessing Windows Files from Linux

Accessing Windows files from Linux inside WSL is automatic because the subsystem mounts your Windows hard drives directly within the Linux file system. You can easily find and open your documents and project files without having to copy them back and forth between the two operating systems.

If your project files are saved in your Windows Documents folder, you can access your project files in Linux by typing cd /mnt/c/Users/YourUsername/Documents in the Linux terminal. Accessing Windows files from Linux matters because you can edit your code using Linux tools without making copies of your files.

Command Prompt
cd /mnt/c/Users/USERNAME/Documents

Accessing Linux Files from Windows

You can also browse your Linux files directly from the Windows File Explorer. Open File Explorer and click on the Linux icon located in the left sidebar. From there, you can click into your installed distributions and view, edit, or copy files using familiar Windows apps.

Using Visual Studio Code with WSL

Using Visual Studio Code with WSL lets you edit code files stored directly inside your Linux environment while enjoying the comfort of the Windows desktop application. You just open your Linux terminal, go to your project folder, and type a simple command to launch a fully connected editor window.

💻Code
code .

This command installs a small helper server in Linux and opens a Visual Studio Code window on your Windows desktop that is fully connected to your Linux system.

Summary

This complete tutorial explains how to enable, install, and configure the Windows Subsystem for Linux (WSL) on Windows 11 so you can run Linux tools alongside your normal apps. You learned how to turn on the feature, install distributions like Ubuntu, upgrade to WSL 2, manage files, and adjust advanced settings.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Disable Command Prompt in Windows 11
Windows How to Disable Command Prompt in Windows 11
How to Run Apps as Administrator in Windows 11
Windows How to Run Apps as Administrator in Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *