How to install Windows Subsystem for Linux (WSL) on Windows 11
When you enable WSL, Windows installs a custom designed Linux kernel. Then you can install Ubuntu or any other Linux distribution on your PC quickly and safely.
How WSL works on Windows 11
First, you can activate Windows Subsystem for Linux (WSL) on all versions of Windows 11 — including Windows 11 Home.
Also, like Windows 10, Windows 11 uses WSL 2. This second version is redesigned and runs the full Linux kernel in the Hyper-V hypervisor for improved compatibility. When you enable this feature, Windows 11 automatically downloads a Linux kernel built by Microsoft to run in the background. At the same time, Windows Update will always ensure that the kernel is in an up-to-date state. (You can also use your own custom Linux kernel if you want).
To use WSL, you need to install a Linux distribution. By default, WSL installs Ubuntu. This will give you access to the full Ubuntu command line environment using the Bash shell or any other shell of your choice.
You can also access your Linux shell environments in the Windows Terminal application that comes with Windows 11.
In addition, you can run graphical Linux applications right out of the box (just install them in the Linux command line environment and run the command). Windows 11 also includes support for running Linux applications with GPU access, helping Linux graphics-related workloads run well on Windows.
Method 1: Install WSL with the command
On Windows 11, you can enable WSL and install a Linux distribution like Ubuntu with a fairly simple command.
First, you will need to use a command line with administrator privileges. This article will show you how to work with Windows Terminal, but you can also use Command Prompt.
To launch Windows Terminal with administrator rights, right-click the Start button on the taskbar or press Windows + X and click 'Windows Terminal (Admin)'. (You can also find the Windows Terminal shortcut in the Start menu — right-click it and select 'Run as Administrator.' Agree to the User Account Control prompt that appears.
To enable WSL and install Ubuntu (the default distribution), you just need to run the following command:
wsl --install
When the process is complete, Windows will ask you to restart your PC. After the system boots, you will be able to use your Linux system immediately. (You can right-click the Start menu and select Shut Down or Sign Out > Restart to quickly reboot.
To list other available Linux distributions, run the following command. (This list lists the distributions (-l) available online (-o)).
wsl -l -o
You can install the Linux distribution of your choice by running the following command, replacing 'Name' with the name of the Linux distribution, as shown in the 'Name' column below:
wsl --install -d Name
For example, to install Debian instead of Ubuntu, you run the following command:
wsl --install -d Debian
You can also run this command multiple times to install several Linux distributions on your system.
After the computer restarts, you can launch the Linux distribution you installed from the Start menu.
Now you can use the Linux shell as if you were on a Linux PC
Method 2: Enable WSL and install the distribution
This is the more 'traditional' and cumbersome method. Therefore, it should only be used if method 1 above cannot be done.
Start by opening the Start menu and searching for the keyword 'Windows features'. Launch the 'Turn Windows Features On or Off' shortcut.
Next, check the box next to 'Windows Subsystem for Linux' here and click 'OK'. You will be prompted to restart your computer.
After the computer restarts, open the Microsoft Store app and search for the Linux distribution you want to use, such as 'Ubuntu'.
Install the Linux distribution you want to use (e.g. Ubuntu) as you would any other application. Just click the 'Install' button on its Store page.
You can now launch the distro from the Start menu just like if it was installed from the command as method 1.
You should read it
- How to install Windows Subsystem for Linux 2 on Windows 10
- Instructions for installing Windows Linux Subsystem on Windows 10
- Running Linux on Windows 10 does not require a virtual machine, here are 18 things you should know
- Microsoft released a tool to run any version of Linux on Windows 10
- How to Enable the Windows Subsystem for Linux
- How to run Linux desktop using Windows Subsystem for Linux
- Windows Subsystem for Linux is about to appear on Windows Server
- How to Run Linux Commands on Windows with WSL 2
- You Don't Need Microsoft Windows Subsystem for Linux (WSL): Here's Why!
- How to run Linux commands when starting Windows Subsystem for Linux on Windows 10
- How to unregister and reset Windows Subsystem for Linux (WSL) distros on Windows 10
- 7 ways to run Linux software on Windows
Maybe you are interested
How to Build a Random Word Generator Using Bash in Linux
Why is tldr command better than man command in Linux?
Turn your Nokia 'brick' phone into a mini computer running Linux
Moving files between Linux systems with SCP
Dangerous 'Helldown' Ransomware Warning Expands to Linux and VMware
Warning of new dangerous malware attack campaign targeting Linux