Complete Installation Guide for WSL on Windows 10 in 2024

Key Notes

  • Install WSL with a simple command: wsl --install
  • Ensure the Virtual Machine Platform is enabled for WSL2.
  • You can download additional distributions directly from the Microsoft Store.

Unleashing the Power of Linux on Windows 10 with WSL

Installing the Windows Subsystem for Linux (WSL) on Windows 10 allows users to seamlessly run a Linux environment alongside their Windows operating system. This guide provides clear, actionable steps to set up WSL effectively.

Step-by-Step Guide to Install WSL on Windows 10

Step 1: Installing WSL Using Command Prompt or PowerShell

Follow these steps to install the Windows Subsystem for Linux on your Windows 10 system:

  1. Open Start on Windows 10.

  2. Search for Command Prompt (or PowerShell ), right-click the first result, and select Run as administrator.

  3. Enter the following command to install WSL and hit Enter :

    wsl --install

  4. Restart your device to complete the installation.

  5. Follow any additional prompts to configure your Ubuntu Linux distribution.

After these steps, WSL will be installed with the latest Ubuntu Linux distribution by default.

Pro Tip: If you encounter error code 14107, check that the “Virtual Machine Platform” feature is enabled in the Windows Features settings.

Step 2: Installing WSL via Microsoft Store

You can also obtain WSL and various distributions directly from the Microsoft Store:

1. Enable WSL Virtualization Components

  1. Open Start.

  2. Search for Turn Windows Features on or off and click the top result.

  3. Check the boxes for both “Virtual Machine Platform” and “Windows Subsystem for Linux”.

  4. Click OK, then restart your computer.

2. Install the WSL App

  1. Visit the WSL store page.

  2. Click Install.

  3. Follow prompts to open and reinstall if necessary.

3. Installing a Linux Distribution

  1. Launch the Microsoft Store app.

  2. Search for a Linux distribution (e.g., Debian ).

  3. Click Get.

  4. After installation, click Open to launch your distribution.

Step 3: Installing WSL2 on Older Versions of Windows 10

For Windows 10 versions 1909 and earlier, install WSL1 then set up WSL2:

Enable the Windows Subsystem for Linux

  1. Open Start.

  2. Search for Turn Windows Features On or Off and click the top result.

  3. Check “Windows Subsystem for Linux”.

  4. Click OK, then restart your computer.

Enable the Virtual Machine Platform

  1. Open PowerShell as administrator.

  2. Run the following command:

    Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

  3. Restart your computer again.

Enable Windows Subsystem for Linux 2

  1. Download the WSL2 kernel update.

  2. Run the downloaded file to apply the update.

  3. Open PowerShell as administrator.

  4. Execute:

    wsl --set-default-version 2

Additional Tips

Additional Tips

  • Always check that your Windows 10 is updated before installing WSL.
  • Consider using Windows Terminal for a better command-line experience with WSL.
  • Explore community-driven Linux distributions for expanded options beyond Ubuntu.

Additional Tips

  • Always check that your Windows 10 is updated before installing WSL.
  • Consider using Windows Terminal for a better command-line experience with WSL.
  • Explore community-driven Linux distributions for expanded options beyond Ubuntu.

Summary

In this guide, we’ve explored how to install and configure the Windows Subsystem for Linux (WSL) on Windows 10, including the essential steps for using Command Prompt, PowerShell, and the Microsoft Store, as well as considerations for older Windows versions.

Conclusion

WSL provides a powerful integration of Linux capabilities within Windows 10, enhancing productivity and development workflows. Take the leap and begin utilizing WSL for your Linux development tasks today!

FAQ (Frequently Asked Questions)

Can I run GUI applications using WSL?

Yes, you can run GUI applications using WSL with the appropriate setups such as X11 or Wayland.

What are the differences between WSL1 and WSL2?

WSL1 uses a translation layer to interface with Windows calls, while WSL2 runs a complete Linux kernel in a lightweight VM, improving speed and compatibility.