Comprehensive Installation Guide for Windows Subsystem for Linux (WSL) on Windows 11
Key Notes
- WSL can be installed via a single command in PowerShell or Command Prompt.
- You can specify different Linux distributions during installation.
- It’s essential to enable the “Virtual Machine Platform” feature for successful installation.
Unlocking Linux on Windows 11: A Comprehensive Guide to Installing WSL
This guide details the steps to install the Windows Subsystem for Linux (WSL) on Windows 11, enabling the seamless running of Linux distributions alongside Windows.
Install WSL on Windows 11
To install WSL on Windows 11 using Command Prompt (or PowerShell), follow these steps:
Step 1: Open Start on Windows 11
Click on the Start button to begin.
Step 2: Search for Command Prompt
Type Command Prompt in the search bar, right-click the top result, and select the Run as administrator option.
Step 3: Install WSL Command
Type the following command to install WSL on Windows 11 and press Enter :
wsl --install
Step 4: Restart Your Computer
After the installation completes, restart your computer to finalize the WSL setup.
Step 5: Linux Distribution Setup
Follow the setup prompts to configure the Linux distribution of your choice.
After completing these steps, the required Linux components, including the latest version of the Ubuntu Linux distribution, will be installed on Windows 11.
Be alert for any installation issues—should you encounter error code 14107, make sure to enable the “Virtual Machine Platform” under Settings > Optional features > More Windows features. Restart and re-run the installation command if necessary.
Update WSL Kernel
To update the WSL kernel from Command Prompt on Windows 11, follow these steps:
Step 1: Open Start
Click on the Start button.
Step 2: Search for Command Prompt
Type Command Prompt in the search bar, right-click the top result, and select the Run as administrator option.
Step 3: Update WSL Command
Run the following command to update your WSL kernel:
wsl --update
If an update is available, it will be automatically downloaded and installed during these steps.
Install WSL with a Specific Distro on Windows 11
To install WSL with a specific Linux distribution on Windows 11, use these steps:
Step 1: Open Start
Click on the Start button.
Step 2: Search for Command Prompt
Type Command Prompt in the search bar, right-click the top result, and select the Run as administrator option.
Step 3: List Available Distros
Type the following command to view a list of available WSL distributions:
wsl --list --online
Step 4: Install Specific Distro Command
Use the following command to install your chosen Linux distribution:
wsl --install -d DISTRO-NAME
Ensure you replace DISTRO-NAME with the desired distro, e.g., Debian.
Step 5: Restart Your Computer
After installation, restart your computer to complete the setup.
Step 6: Linux Distribution Setup
Proceed with the necessary setup for your chosen Linux distribution.
Upon completing these steps, the Windows Subsystem for Linux components alongside your specified distribution will be installed successfully.
Install WSL from the Microsoft Store
If you prefer installing WSL and its distributions from the Microsoft Store, you must enable certain components in Windows Features, followed by downloading WSL from the Store.
1. Enable WSL Required Components
To activate the necessary features for running Linux on Windows 11, follow these steps:
Step 1: Open Start
Click on the Start button.
Step 2: Search Windows Features
Type Turn Windows Features on or off in the search and click the top result.
Step 3: Enable Virtual Machine Platform
Check the box for “Virtual Machine Platform”.
Step 4: Enable Windows Subsystem for Linux
Check the box for “Windows Subsystem for Linux”.
Step 5: Confirm and Restart
Click the OK button and then restart your computer.
After enabling these components, proceed to download WSL from the Microsoft Store.
Even though the Store method should install all necessary components, manually enabling “Virtual Machine Platform” and “Windows Subsystem for Linux” is often recommended to avoid errors like error code 14107 or 0x8004032d.
2. Install Windows Subsystem for Linux App
Follow these steps to install the WSL layer on Windows 11:
Step 1: Open WSL Store Page
Visit the Windows Subsystem for Linux store page.
Step 2: Install the App
Click the Install button to download the app.
Step 3: Open Microsoft Store
If prompted, click “Open Microsoft Store”.
Step 4: Finalize Installation
Click the Install button again to complete the installation.
3. Install Linux Distro
To install a Linux distribution from the Microsoft Store, follow these steps:
Step 1: Open Microsoft Store App
Launch the Microsoft Store app.
Step 2: Search for Linux Distributions
Enter the name of desired Linux distributions, for instance, Debian.
Step 3: Get the Distribution
Click the Get button to begin the download.
Step 4: Open Installed Distro
After installation, click the Open button to launch the Linux distribution.
Upon completing these steps, WSL will be set up on Windows 11, including support for running Linux GUI applications.
Summary
This guide provided a comprehensive overview of how to install the Windows Subsystem for Linux on Windows 11. Whether using the command line, specific distributions, or the Microsoft Store, these steps enable users to access powerful Linux tools directly on their Windows devices.
Conclusion
Installing the Windows Subsystem for Linux opens a world of possibilities for developers and IT professionals alike. With just a few commands, you can run various Linux distributions alongside your Windows environment, enhancing productivity and access to versatile tools. Follow the outlined steps to dive into the power of Linux without the need for virtual machines or dual-boot setups.
FAQ (Frequently Asked Questions)
What is the Windows Subsystem for Linux?
WSL allows Windows users to run native Linux command-line tools and applications without needing a separate Linux installation.
Can I run GUI applications using WSL?
Yes, WSL supports running GUI applications via tools like X11 or Wayland.
Is WSL free to use?
Yes, WSL is free and comes as part of the Windows 11 operating system.
Additional Information
For further reading on WSL and its features, please visit the official Microsoft WSL documentation. This resource provides deeper insights, troubleshooting steps, and guidelines for advanced usage of WSL.
FAQ (Frequently Asked Questions)
What is the Windows Subsystem for Linux?
WSL allows Windows users to run native Linux command-line tools and applications without needing a separate Linux installation.
Can I run GUI applications using WSL?
Yes, WSL supports running GUI applications via tools like X11 or Wayland.
Is WSL free to use?
Yes, WSL is free and comes as part of the Windows 11 operating system.