The Wayback Machine - https://web.archive.org/web/20250114225511/https://www.geeksforgeeks.org/how-to-install-the-windows-subsystem-for-linux-on-windows-11/
Open In App

How to Install the Windows Subsystem for Linux on Windows 11?

Last Updated : 25 Apr, 2022
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

As a programmer, it is very important to test software on multiple platforms. However, it can be very tedious and inefficient to use multiple virtual machines to achieve the same. Thankfully, this process can be simplified if you are using Windows and wish to run a Linux distribution – with WSL. WSL, or Windows Subsystem for Linux, lets developers run a Linux or GNU environment directly and enables one to run a bash terminal on a Windows system, without necessarily relying on a full virtual machine or dual boot setup in place. As such it is a lightweight and resource-efficient alternative.

Installing WSL and running Linux  on  Windows 11

following are the steps to install WSL and then run Linux on Windows 11:

Step 1: Open Windows Terminal. Right Click on the Start button on the taskbar, and choose ‘Windows Terminal (Admin)’. 

Open-Windows-Terminal

 

Choose-Windows-Terminal

 

Alternatively, you can simply click on the Search icon, and search for Windows Terminal. Then, hover on ‘Windows Terminal’. Finally, On the menu that appears on right, choose, ‘Run as Administrator’.

 

Or for installation, we can also use Powershell. Another alternative is to use Powershell. Following a similar procedure as the one outlined above, search for ‘Powershell’, and click, ‘Run as Administrator’.

Use-Powershell.

 

Step 2: Now, type the following to install WSL:

wsl –install

Install-WSL

 

When the process is finally over, Windows will prompt you to restart your PC.

Step 3: Click on the Start Button -> Power -> Restart, or Alt + F4 + U and choose Restart from the Options.

Choose-Restart-from-the-Options.

 

Step 4: After restarting, open your terminal or PowerShell again. Now, you can install any Linux distribution of your choice, by running the following command:

wsl –install -d <name of the distribution>

For instance:

1. To install kali-linux, type:

wsl –install -d kali-linux

2. To install Debian, type:

wsl –install -d Debian

Install-Debian

 

Step 5: To view a list of all available Linux distributions, you can run one of the following commands:

wsl –list –online

or, 

wsl –l -o

View-the-list-of-all-available-Linux-distributions

 

Step 6: Once the distribution has finished downloading, a new window will open. Now, you will be prompted to enter your username and password. Upon entering these, you will be ready to use Linux on Windows!

Enter-your-username-and-password

 

Step 7: It is strongly recommended that as soon as you install your chosen distribution, you run the following command to ensure that your installation is up to date:

sudo apt-get update

Updating-system

 


Get 90% Course fee refund on completing 90% course in 90 days! Take the Three 90 Challenge today.

The next 90 Days of focus & determination can unlock your full potential. The Three 90 challenge has started and this is your chance to upskill and get 90% refund. What more motivation do you need? Start the challenge right away!


Next Article

Similar Reads

three90RightbarBannerImg