Step-by-Step Guide to Installing Windows Subsystem for Linux (WSL) on Windows 11

Key Notes

  • Install WSL on Windows 11 using a single command.
  • Easily update the WSL kernel with a simple command.
  • Install specific Linux distributions using command line options.

Seamlessly Install Windows Subsystem for Linux (WSL) on Windows 11

This comprehensive guide will walk you through the process of installing and updating the Windows Subsystem for Linux (WSL) on Windows 11. This is essential for developers, IT professionals, and Linux enthusiasts eager to harness the strengths of both operating systems.

Install WSL on Windows 11

Step 1: Use a Single Command to Install WSL

Launch Command Prompt or PowerShell as an administrator.

To do this, search for either Command Prompt or PowerShell in the Start menu, right-click on it, and select Run as administrator.

Once open, type the following command and hit Enter :

wsl --install

This command installs WSL along with the default Ubuntu distribution. Finally, restart your computer to complete the installation.

Pro Tip: After rebooting, follow on-screen instructions to set up your Linux environment.

Step 2: Update the WSL Kernel

To keep your WSL environment running smoothly, it’s crucial to update the kernel regularly.

Open Command Prompt or PowerShell again as an administrator and execute the following command:

wsl --update

This command checks for any available updates to the WSL kernel and installs them automatically.

Pro Tip: Regular updates help ensure that you have the latest features and security enhancements.

Install WSL with a Specific Distro

Step 3: Install a Specific Linux Distro

To install your preferred Linux distribution, begin by checking the available options. Open Command Prompt or PowerShell as administrator and run:

wsl --list --online
Quick note: Supported distributions include Ubuntu, Debian, Kali Linux, and more.

Once you know which distro you want, use the following command to install it, replacing DISTRO-NAME with your chosen distribution:

wsl --install -d DISTRO-NAME

After installation, be sure to restart your computer again to finalize the process.

Install WSL from Microsoft Store

You can also opt to install WSL through the Microsoft Store, which simplifies the updating process. Here’s how:

1. Enable the Virtual Machine Platform

  1. Open Start.
  2. Search for Turn Windows features on or off and click to open the app.
  3. Activate the Virtual Machine Platform option.
  4. Click the OK button.
  5. Restart your PC when prompted.

2. Install the WSL App

  1. Go to the Windows Subsystem for Linux app page.
  2. Click the Get button.
  3. Once installed, click Open and then again click Get to finalize the installation.

3. Install a Linux Distro

  1. Open the Microsoft Store.
  2. Search for your desired Linux distribution.
  3. Click Get, then Open to launch your chosen distribution.

After following these steps, WSL will be successfully installed, including the ability to run Linux GUI applications.

Additional Tips

  • Keep your Linux distros up to date with the commands sudo apt update and sudo apt upgrade.
  • Leverage the Windows Terminal for a better command line experience.
  • Explore additional Linux distributions available via the Microsoft Store.

Summary

This guide provides a detailed overview of installing and updating the Windows Subsystem for Linux on Windows 11. Key steps include using a single command for installation, updating the kernel easily, or installing specific distributions through both command line and Microsoft Store options. Following the outlined steps will equip users with a robust Linux environment on their Windows systems.

Conclusion

Installing and updating WSL on Windows 11 is now a straightforward process thanks to simplified command-line options and the flexibility of the Microsoft Store. Embrace the power of Linux within your Windows environment, and leverage these tools for enhanced development and productivity.

FAQ (Frequently Asked Questions)

What is WSL?

WSL, or Windows Subsystem for Linux, allows users to run a Linux environment directly on Windows without the need for a virtual machine or dual-boot setup.

Can I run GUI applications with WSL?

Yes! With the latest versions of WSL, you can run Linux GUI applications natively alongside your Windows applications.