How to Install WSL2 on Windows 11: A Step-by-Step Guide for Beginners

Installing WSL2 on Windows 11 is a breeze if you follow these simple steps. First, you’ll enable the Windows Subsystem for Linux and Virtual Machine Platform features. Then, you’ll install a Linux distribution from the Microsoft Store. Finally, you’ll set WSL2 as your default version. These steps will have you up and running with a Linux environment on your Windows 11 machine in no time!

How to Install WSL2 on Windows 11

Ready to get Linux running on your Windows 11 system? Follow these steps, and you’ll have WSL2 installed and configured quickly.

Step 1: Enable WSL

Open PowerShell as an administrator and run wsl --install.

This command will enable the Windows Subsystem for Linux and download the necessary components. You’ll need to restart your computer once this is done.

Step 2: Enable Virtual Machine Platform

Run dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart in PowerShell.

Enabling the Virtual Machine Platform is essential for WSL2 to work. This feature allows for the virtualization capabilities that WSL2 needs.

Step 3: Restart Your Computer

Restart your computer to apply the changes.

A restart ensures that all the new features and settings are properly applied, making sure WSL2 runs smoothly.

Step 4: Set WSL2 as Default Version

Run wsl --set-default-version 2 in PowerShell.

This step ensures that any new Linux distributions installed will use WSL2 by default, giving you the benefits of improved performance and functionality.

Step 5: Install a Linux Distribution

Open the Microsoft Store, search for your preferred Linux distribution, and click ‘Install’.

Whether it’s Ubuntu, Debian, or any other distribution, downloading it from the Microsoft Store is straightforward and ensures compatibility with WSL2.

Step 6: Launch and Set Up Your Linux Distribution

After installation, open your new Linux distribution and follow the on-screen setup instructions.

You’ll be prompted to create a new user account and set up your environment. Once that’s done, you’re ready to start using Linux on Windows!

After completing these steps, you’ll have a fully functional WSL2 setup on your Windows 11 system. You can run Linux commands, install software, and enjoy the best of both worlds right from your Windows desktop.

Tips for Installing WSL2 on Windows 11

  • Update Windows 11: Make sure your Windows 11 is up to date before starting the installation to avoid compatibility issues.
  • Check System Requirements: Ensure your system supports virtualization, a requirement for WSL2.
  • Disable Third-Party Antivirus: Temporarily disable any third-party antivirus software to prevent it from blocking the installation process.
  • Use PowerShell as Administrator: Always run PowerShell as an administrator to avoid permission issues.
  • Backup Important Files: Although the installation process is safe, it’s always a good idea to back up important files.

Frequently Asked Questions

What is WSL2?

WSL2 (Windows Subsystem for Linux 2) is a feature in Windows 11 that allows you to run a real Linux kernel in a lightweight virtual machine.

Do I need to pay for WSL2?

No, WSL2 is a free feature included with Windows 11.

Can I run graphical Linux applications with WSL2?

Yes, with WSL2 and the addition of Windows 11’s support for GUI apps, you can run graphical Linux applications seamlessly.

What Linux distributions are available for WSL2?

Popular distributions like Ubuntu, Debian, Kali Linux, and more are available for WSL2 through the Microsoft Store.

How do I update WSL2?

You can update WSL2 by running wsl --update in PowerShell.

Summary

  1. Enable WSL: wsl --install
  2. Enable Virtual Machine Platform: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. Restart Your Computer
  4. Set WSL2 as Default Version: wsl --set-default-version 2
  5. Install a Linux Distribution from the Microsoft Store
  6. Launch and Set Up Your Linux Distribution

Conclusion

Installing WSL2 on Windows 11 bridges the gap between Windows and Linux, making it easier than ever to enjoy the strengths of both operating systems. By following the steps outlined, you’ll be well on your way to running a powerful Linux environment on your Windows machine. Whether you’re a developer looking to streamline your workflow or just curious about diving into Linux, WSL2 offers a robust and user-friendly solution.

Don’t forget to explore the various Linux distributions available and customize your environment to suit your needs. Feeling adventurous? Try out different distributions and see which one fits you best. With WSL2, the world of Linux is at your fingertips, right alongside your familiar Windows tools.

If this guide helped you, or if you have any questions, drop a comment below. Happy coding!

Join Our Free Newsletter

Featured guides and deals

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