What Windows Subsystem for Linux does and why you might want it

Windows Subsystem for Linux (WSL) lets you run a Linux operating system alongside Windows without restarting your computer or using a separate virtual machine. When you install WSL, you get access to Linux tools, programming languages, and command-line programs that don't normally run on Windows — all from within Windows itself.

From a security perspective, WSL matters because it lets you use Linux-native security tools on a Windows machine. If you work with encryption software, password managers, or security testing tools that were built for Linux, WSL gives you a way to use them without buying separate hardware or maintaining a second computer. It also isolates those tools in their own environment, so if something goes wrong in Linux, it doesn't directly affect your Windows installation.

WSL is not required for most people. If you use Windows normally — email, web browsing, office work — you don't need it. But if you're a developer, security researcher, or someone who works with Linux-based tools regularly, WSL can save you time and money.

Key Takeaways

  • WSL requires Windows 10 version 2004 or later, or any version of Windows 11, and you need administrator access to install it.
  • The fastest installation method is to open PowerShell as administrator and run a single command: wsl --install.
  • After installation, you'll need to create a username and password for your Linux environment, which is separate from your Windows login.
  • WSL runs Linux in an isolated container, so problems in Linux won't affect your Windows files or settings unless you deliberately share folders.
  • You can uninstall WSL completely from Windows Settings if you no longer need it, and your Windows system will return to its previous state.

Check your Windows version before you start

WSL only works on Windows 10 version 2004 and later, or any version of Windows 11. If you're running an older version of Windows 10, you'll need to update first. To check your version, press the Windows key and type "winver", then press Enter. A window will open showing your Windows version number.

If your version number is 2004 or higher, you're ready to install. If it's lower, go to Settings > Update & Security > Windows Update and click "Check for updates". Windows will read and install the latest version, which may take 20 minutes to an hour and may require a restart.

You also need administrator access on your computer. If you don't have administrator rights, ask whoever manages your computer to either give you those rights or install WSL for you.

Install WSL using PowerShell

The simplest way to install WSL is through PowerShell, which is a command-line tool built into Windows. Press the Windows key, type "PowerShell", right-click on "Windows PowerShell", and select "Run as administrator". A dark window will open with a command prompt.

In that window, type this command exactly as shown:

wsl --install

Press Enter. PowerShell will read and install WSL and a default Linux distribution (usually Ubuntu). This process takes 5 to 15 minutes depending on your internet speed. You'll see text scrolling in the window as files read and install. When it finishes, you'll see a message asking you to restart your computer.

Restart your computer. When Windows starts again, WSL will finish its setup automatically. You may see a terminal window open briefly — this is normal and part of the installation process.

Create your Linux username and password

After your computer restarts, a terminal window will open and ask you to enter a username for your Linux environment. This username is separate from your Windows login — you can use the same name or something different. Type a username (lowercase letters and numbers work best) and press Enter.

Next, you'll be asked to enter a password. Type a password and press Enter. You won't see the letters as you type — this is normal for security reasons. You'll be asked to enter the password again to confirm it. Once you do, your Linux environment is ready to use.

Write down this username and password somewhere safe. You'll need the password whenever you install new programs or make changes in Linux. If you forget it, you can reset it, but it's easier to remember it from the start.

Open and use WSL after installation

Once installation is complete, you can open WSL anytime by pressing the Windows key, typing "Ubuntu" (or whatever Linux distribution you installed), and pressing Enter. A terminal window will open showing your Linux command prompt, which usually looks like username@computername:~$.

From here, you can type Linux commands to install programs, manage files, or run security tools. If you're new to Linux commands, common ones include ls (list files), cd (change directory), and sudo apt install (install a program). Each Linux distribution has its own package manager — Ubuntu uses apt, which is what you'll use to read and install Linux programs.

Your Windows files are accessible from Linux at /mnt/c/ (for your C: drive), /mnt/d/ (for D: drive), and so on. However, it's generally safer to keep Linux files in your Linux home directory and Windows files in Windows. Mixing them can sometimes cause permission problems.

Uninstall WSL if you no longer need it

If you decide WSL isn't for you, you can remove it completely. Open Settings, go to Apps > Apps & features, scroll down to find "Windows Subsystem for Linux", click it, and select "Uninstall". Windows will remove WSL and free up the disk space it was using.

Uninstalling WSL does not affect your Windows files, settings, or programs. Everything in Windows stays exactly as it was. If you installed any Linux programs or created files in your Linux environment, those will be deleted, but you can back them up first if you need them.

If you want to keep WSL but remove a specific Linux distribution (like Ubuntu), you can do that separately. Open PowerShell as administrator and type wsl --list --verbose to see what you have installed, then type wsl --unregister Ubuntu (or whatever distribution name you want to remove).

Frequently Asked Questions

Do I need to uninstall Windows to use WSL?

No. WSL runs Linux inside Windows without replacing it or requiring a restart. Your Windows installation stays exactly as it is, and you can switch between Windows and Linux without rebooting.

Will WSL slow down my computer?

WSL uses some disk space and memory when it's running, but the impact is usually small. If you're not actively using WSL, it doesn't consume resources. You can close the terminal window to stop it.

Can I access my Windows files from Linux?

Yes. Your Windows drives are available in Linux at /mnt/c/, /mnt/d/, and so on. However, for security and performance reasons, it's better to keep Linux files in Linux and Windows files in Windows.

What if the installation fails or gets stuck?

Restart your computer and try again. If it fails a second time, open PowerShell as administrator and type wsl --update to update WSL itself, then try wsl --install again. If you're still stuck, you can uninstall and reinstall from scratch.

Can I use WSL on a work computer?

That depends on your workplace's security policy. Some organizations restrict what software you can install. Check with your IT department before installing WSL on a work computer.