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

Installing WSL on Windows 10 can transform your computer into a versatile workspace capable of running Linux alongside your regular Windows applications. It’s a great way to dip your toes into the world of Linux without needing separate hardware. Let me show you how to install WSL on Windows 10 in a few easy steps.

How to Install WSL on Windows 10

First, let’s break down what we’re about to do. Installing the Windows Subsystem for Linux (WSL) will let you run a Linux distribution—like Ubuntu—right on your Windows 10 machine. This setup is perfect for developers, system administrators, or anyone eager to explore Linux functionalities.

Step 1: Enable Windows Subsystem for Linux

Open PowerShell as an Administrator by right-clicking the Start menu and selecting "Windows PowerShell (Admin)."

You’ll be using PowerShell to turn on the WSL feature. Type the following command and hit Enter: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart. This command turns on the WSL feature but doesn’t restart your machine immediately.

Step 2: Enable Virtual Machine Platform

In the same PowerShell window, run another command to enable the Virtual Machine Platform: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart.

Like the first step, this command sets up your system to support running Linux distributions. You won’t see any immediate changes, but this step is necessary for WSL 2.

Step 3: Restart Your Computer

Restart your computer to apply the changes made by the previous commands.

A simple reboot ensures all the features you’ve enabled take effect. Once your computer restarts, you’re ready for the next steps.

Step 4: Download a Linux Distribution

Go to the Microsoft Store, search for your preferred Linux distribution (e.g., Ubuntu), and click ‘Get’ to download and install it.

The Microsoft Store offers various Linux distributions like Ubuntu, Debian, and Kali Linux. Pick one that suits your needs, and the installation will proceed just like any other app.

Step 5: Set Up Your Linux Distribution

Open your newly installed Linux distribution from the Start menu and follow the on-screen instructions to set it up.

When you launch the Linux distribution for the first time, it might take a few minutes to set up. You’ll need to create a user account and set a password for your Linux environment.

Step 6: Update and Upgrade Your Linux Distribution

Once your Linux distribution is set up, run the following command in the terminal: sudo apt update && sudo apt upgrade.

This command ensures that all the software packages in your Linux environment are up to date. It might take a few minutes but is crucial for security and performance.

After completing these steps, your Windows 10 machine will be equipped to run Linux, enabling you to enjoy the best of both worlds.

Tips for Installing WSL on Windows 10

  • Run PowerShell as Admin: Always run PowerShell as an Administrator to avoid permission issues.
  • Choose WSL 2: WSL 2 offers better performance and full Linux kernel support compared to WSL 1.
  • Check System Requirements: Make sure your Windows 10 version is 1903 or higher for WSL 2.
  • Use Windows Terminal: For a more integrated experience, use Windows Terminal, which supports multiple tabs and profiles.
  • Backup Data: Always back up important data before making significant system changes.

Frequently Asked Questions

What is WSL?

WSL stands for Windows Subsystem for Linux. It’s a compatibility layer for running Linux binary executables natively on Windows.

Can I run GUI applications with WSL?

Yes, you can run GUI applications with WSL 2 when combined with a compatible X server on Windows.

Do I need to uninstall WSL 1 to install WSL 2?

No, you can upgrade your existing WSL 1 distributions to WSL 2 without uninstalling.

Is WSL free?

Yes, WSL and the associated Linux distributions are free to download and use.

What are the system requirements for WSL 2?

Your system should be running Windows 10 version 1903 or higher with Build 18362 or higher.

Summary

  1. Enable WSL: Run dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart.
  2. Enable Virtual Machine Platform: Run dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart.
  3. Restart Computer: Reboot to apply changes.
  4. Download Linux Distribution: Get it from the Microsoft Store.
  5. Set Up Linux Distribution: Follow on-screen instructions.
  6. Update and Upgrade: Run sudo apt update && sudo apt upgrade.

Conclusion

Installing WSL on Windows 10 opens up a world of possibilities, allowing you to run a full Linux environment natively on your Windows machine. This guide took you through enabling the necessary features, downloading a Linux distribution, and preparing your system to make the most out of WSL. Now that you’ve got WSL up and running, you can explore Linux tools, run scripts, and develop software all within the comfort of your Windows setup.

If you found this guide helpful, consider diving deeper into specific Linux commands or exploring advanced WSL features. The world of Linux is vast and full of opportunities for learning and growth. Don’t hesitate to experiment and see what works best for you. Happy computing!