How to install Windows Subsystem for Linux on Windows 11 - WSL
Windows subsystem for Linux is a popular tool that lets developers run GNU/Linux environments. This allows users to run command-line tools, utilities, and applications built for Linux without the hassle and overhead of managing virtual machines.
With the release of Windows 11 users will use the new simplified installation process of the Windows Subsystem for Linux 2.
The single command that downloads and installs all the components, including the virtual machine platform and the support for Linux GUI apps.
The command-line tools install Ubuntu distribution by default. If you wish to install another distribution, you can do it by installing a distro from Microsoft Store or using the WSL command with an additional switch.
Prerequists
In order to follow along with the guide, you’ll need:
- Personal computer with Windows 11 installed: The Windows subsystem for Linux 2 requires Windows 11 Insider or latest Windows 11 build when released for both ARM64 and AMD64.
Install WSL on Windows 11
To install WSL on Linux, start a command prompt or PowerShell prompt with elevated privileges (admin).
- Open Start on Windows 11
- Search for Command Prompt or PowerShell, right-click the top result and select the Run as administrator option.
3. Type the following command to install WSL on Windows 11 and press ENTER
wsl --install
4. Restart the computer as instructed by the command to complete the installation.
Once you complete the installation steps, the components required for running WSL and latest version of Ubuntu distribution will be available for use.
Install other distributions supported by WSL on Windows 11
If you like to install other distributions supported by WSL, WSL includes a command to view and selects a different Linux distribution.
At the time of writing, WSL officially supports following distributions:
- Ubuntu
- Debian GNU/Linux
- Kali Linux Rolling
- openSUSE leap 42
- SUSE Linux Enterprise Server v12
- Ubuntu 16.04 LTS
- Ubuntu 18.04 LTS
- Ubuntu 20.04 LTS
- Open Start
- Search for PowerShell or Command Prompt, right-click on the result, and select the Run as administrator option.
- Type the following command to get a list of available Microsoft provided WSL distributions:
wsl --list --online
4. Type the following command to install the preferred WSL distribution:
wsl --install -D <DISTRIBUTION>
<DISTRIBUTION> is a placeholder for NAME table printed by wsl --list --online command
5. Restart your computer to complete the installation of the new distribution