How to Install WSL on Windows 10: A Complete Step-by-Step Guide

Hey there, ever wished you could run Linux stuff right on your Windows computer without all the hassle of dual-booting or setting up a bulky virtual machine? Well, you’re in luck because the Windows Subsystem for Linux, or WSL, makes that dream a reality. Installing WSL on Windows 10 is actually pretty straightforward. You’ll basically enable a couple of Windows features, grab a small update for WSL itself, and then pick your favorite Linux flavor, like Ubuntu, right from the Microsoft Store. Once it’s all set up, you’ll have a powerful Linux command-line environment running alongside your Windows apps, ready for all your coding, scripting, and development needs. It’s a total game-changer for many folks.

Tutorial – How to Install WSL on Windows 10

Alright, let’s get down to business. This section will walk you through the precise steps needed to set up WSL on your Windows 10 machine. We’re going to enable some hidden features, update the necessary components, and finally, install a Linux distribution so you can start having some fun.

Step 1: Enable the Windows Subsystem for Linux feature.

This is the foundational step, essentially telling Windows, “Hey, I want to run Linux!” You can do this easily by opening PowerShell as an administrator and typing dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart.

This command flips the switch for the core WSL component on your system. Think of it like unlocking a secret door within Windows that leads to a Linux world. There’s also a graphical way to do it by searching “Turn Windows features on or off” in your start menu, but the PowerShell command is often quicker and more direct for those who are comfortable with it.

Step 2: Enable the Virtual Machine Platform feature.

This step is super important if you want to use the newer, faster WSL 2. Just like before, open PowerShell as an administrator and run dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart.

WSL 2 uses a lightweight virtual machine to provide a full Linux kernel experience, resulting in better performance and compatibility than the older WSL 1. Enabling the Virtual Machine Platform is what makes this lightweight virtualization possible, giving your Linux distribution a much more native feel.

Step 3: Restart your computer.

After enabling these important features, it’s absolutely essential to restart your computer. These changes are deep within your system, and a reboot ensures everything is properly configured and ready to go.

Seriously, don’t skip this part! Imagine trying to bake a cake but forgetting to preheat the oven; things just won’t work right. A fresh restart makes sure both the Windows Subsystem for Linux and the Virtual Machine Platform are fully active and cooperating.

Step 4: Update to the WSL 2 Linux kernel.

You’ll need to download and install a small update package for the WSL 2 Linux kernel. Just open a web browser and search for “WSL 2 Linux kernel update package,” or visit the official Microsoft documentation page for the download link.

This package updates the actual Linux kernel that WSL 2 uses, ensuring you have the latest performance improvements, bug fixes, and hardware compatibility. It’s a quick installation, just like installing any other small program, and it keeps your WSL environment modern and efficient.

Step 5: Set WSL 2 as your default version.

Open PowerShell again, this time as a regular user is fine, and type wsl --set-default-version 2. This command tells Windows that any new Linux distributions you install should automatically use the WSL 2 architecture.

This is a really handy command because it saves you from having to specify WSL 2 every time you get a new distro. It future-proofs your setup, making sure you always get the best performance and features right out of the gate.

Step 6: Install your chosen Linux distribution from the Microsoft Store.

Now for the fun part! Open the Microsoft Store, search for your preferred Linux distribution, like “Ubuntu,” and click the “Install” button. There are many options, including Debian, Kali Linux, and SUSE, so pick the one that calls to you.

Once it’s installed, just open the app from your Start menu, and it will complete the final setup, asking you to create a username and password for your new Linux environment. This is your gateway into the world of Linux, ready to be explored!

Once you’ve completed these steps and installed your chosen Linux distribution, you’ll have a fully functional Linux command-line environment at your fingertips. When you first open your Linux distribution, it will take a moment to “finalize” the installation, then prompt you to create a username and password specific to that Linux instance. This user account operates independently of your Windows user. From there, you can start installing Linux software, running commands, and doing all the cool development work you would normally do on a native Linux machine. It truly integrates Linux into your Windows workflow.

How to Install WSL on Windows 10 Tips

  • Always keep your Windows operating system updated. Microsoft frequently releases improvements and fixes for WSL, and staying current ensures you get the best experience and the latest features.
  • Consider using Windows Terminal. It’s a fantastic, modern terminal application from Microsoft that provides tabs, custom themes, and better performance for all your command-line tools, including WSL.
  • Before you restart your computer after enabling features, make sure you save any open work. A sudden reboot can sometimes lead to lost data if you’re not careful.
  • Don’t be afraid to experiment with different Linux distributions. While Ubuntu is a great starting point, distributions like Debian, Kali Linux, or even openSUSE offer unique tools and environments that might better suit your specific needs.
  • Explore the wsl --mount command. This advanced feature allows you to attach and mount physical disk drives or virtual hard disks (VHDs) directly from within your WSL 2 environment, which can be incredibly useful for data recovery or specific development scenarios.
  • If you’re a developer, definitely install Visual Studio Code and its “Remote – WSL” extension. This lets you develop code directly inside your WSL Linux environment while still using the familiar VS Code interface on Windows, a truly seamless experience.

Frequently Asked Questions

What is WSL anyway?

WSL, or Windows Subsystem for Linux, is a compatibility layer that lets you run a GNU/Linux environment directly on Windows. It’s essentially a way to use Linux command-line tools, utilities, and applications without needing a traditional virtual machine or setting up a dual-boot system. Think of it as having the best parts of Linux seamlessly integrated into your Windows machine.

Do I need an internet connection to install WSL?

Yes, you absolutely need an internet connection for a couple of key steps during the WSL installation process. You’ll need it to download the WSL 2 Linux kernel update package and, crucially, to download your chosen Linux distribution, like Ubuntu, from the Microsoft Store. Without internet, you won’t be able to get these essential components.

Can I run graphical Linux applications with WSL?

Good news! With recent updates, WSL now fully supports running graphical Linux applications, a feature often referred to as WSLg. This means you can install and use full-blown Linux desktop apps, like GIMP or Firefox, directly on your Windows desktop, complete with sound and GPU acceleration, just as if they were native Windows applications.

Is WSL 1 or WSL 2 better?

Generally speaking, WSL 2 is significantly better than WSL 1. WSL 2 uses a real Linux kernel running in a lightweight virtual machine, which provides vastly improved file system performance, full system call compatibility, and support for running Docker Desktop directly within WSL. WSL 1 is an older architecture that has limitations and is much slower for certain operations, so always aim for WSL 2.

How do I uninstall a Linux distribution from WSL?

Uninstalling a Linux distribution from WSL is just like uninstalling any other app on Windows. Go to your Windows “Settings,” then “Apps,” find your Linux distribution (e.g., “Ubuntu”), and click “Uninstall.” Alternatively, for those who prefer the command line, you can open PowerShell and use the command wsl --unregister, replacing “ with the actual name of your installed distro.

Summary

  1. Enable Windows Subsystem for Linux.
  2. Enable Virtual Machine Platform.
  3. Restart your computer.
  4. Update WSL 2 Linux kernel.
  5. Set WSL 2 as default.
  6. Install Linux distribution from Store.

Conclusion

So, there you have it: a complete walkthrough for installing WSL on Windows 10. By following these steps, you’ve unlocked a truly powerful capability that bridges the gap between the familiar Windows environment and the vast, open-source world of Linux. This isn’t just a technical trick; it’s a fundamental shift in how developers, system administrators, and even curious learners can interact with their computing environment. Imagine having access to thousands of Linux tools, commands, and applications, all running seamlessly without the overhead or complexity of traditional virtual machines. That’s the magic of WSL.

The move to WSL 2, with its genuine Linux kernel and lightweight virtualization, has truly cemented its place as an indispensable tool. You’ll notice snappy performance, full compatibility with Linux system calls, and easy integration with other development tools like Docker Desktop. For anyone serious about modern software development, data science, or even just exploring different operating systems, mastering WSL is a huge step. It democratizes access to Linux, removing many of the old barriers and making powerful open-source technologies more accessible than ever before.

As Windows continues to embrace open-source initiatives, WSL will only grow in importance and capability. Features like WSLg, which lets you run full-fledged graphical Linux applications, show just how far this integration has come. So, don’t just stop at the installation. Dive in, explore your new Linux environment, install some packages, write some scripts, and see what amazing things you can build. The knowledge of how to install WSL on Windows 10 is your ticket to a more flexible, powerful, and exciting computing experience. The journey into the world of Linux on Windows has just begun for you, and trust me, it’s going to be an incredible ride.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy