How to integrate the Windows Subsystem for Linux with Windows 11?

Testing software across multiple platforms is crucial for a programmer. However, managing multiple virtual machines can be time-consuming and inefficient. Fortunately, if you are using Windows and need to run a Linux distribution, the Windows Subsystem for Linux (WSL) offers a streamlined solution. WSL allows developers to run a Linux or GNU environment directly on Windows, providing a bash terminal without the need for a full virtual machine or dual boot setup. This makes it a lightweight and resource-efficient option.

Read More: How to install PHP 8.4.3 on Windows 11?

Installing WSL and Running Linux on Windows 11

Here’s a step-by-step guide to installing WSL and running Linux on Windows 11:

Step 1: Open Windows Terminal

  • Right-click the Start button on the taskbar and select ‘Windows Terminal (Admin)’.
  • Alternatively, click the Search icon, type ‘Windows Terminal’. From the right-hand menu, choose ‘Run as Administrator’.
  • You can also use PowerShell for the installation. Search for ‘PowerShell’ and select ‘Run as Administrator’.

Step 2: Install WSL

In the terminal or PowerShell, type the following command to install WSL:

wsl --install

Once the installation is complete, Windows will prompt you to restart your computer.

Step 3: Restart Your PC


Click the Start button, go to Power, and select Restart. Alternatively, press Alt + F4 and choose Restart from the options.

Step 4: Install a Linux Distribution

After restarting, reopen your terminal or PowerShell. You can now install any Linux distribution by running:

wsl --install -d <distribution-name>

For example:

  • To install Kali Linux, type:
wsl --install -d kali-linux
  • To install Debian, type:
wsl --install -d Debian

Step 5: View Available Linux Distributions

To see a list of all available Linux distributions, run one of the following commands:

wsl --list --online

or

wsl-l-o

Step 6: Set Up Your Linux Distribution


Once the distribution finishes downloading, a new window will open. You will be prompted to create a username and password. After entering these details, you will be ready to use Linux on Windows.

Step 7: Update Your System

After installing your chosen distribution, it is highly recommended to update your system by running:

sudo apt-get update

This ensures your installation is up-to-date and ready for use.

Closing Remarks

The Windows Subsystem for Linux (WSL) is a powerful tool for developers who need to run Linux environments on Windows without the overhead of virtual machines or dual-boot setups. By following the steps outlined above, you can easily install WSL, set up your preferred Linux distribution, and start using Linux directly on Windows 11. This lightweight and resource-efficient solution not only saves time but also enhances productivity by allowing seamless cross-platform development and testing. Once installed, remember to keep your Linux distribution updated to ensure optimal performance and security. With WSL, you can enjoy the best of both worlds, Windows and Linux, on a single machine.

Zarnab Latif

Zarnab Latif is a versatile technical writer with a passion for demystifying the complexities of Artificial Intelligence (AI). She excels at creating clear, concise and user-friendly content that helps developers, engineers, and non-technical stakeholders understand and effectively utilize AI technologies.

Recent Posts

AI-Driven Threat Detection and Response: How AI Improves Real-Time Cyber Security in Cloud Environments

Keeping cloud environments secure isn’t getting any easier. Hackers aren’t just guessing passwords anymore; they’re…

2 days ago

Boost Shopify Loyalty with AI Personalization: Drive Lasting Customer Relationships

Acquiring new customers opens the door to your Shopify store, but nurturing their loyalty is…

4 days ago

EDB to PST Conversion Made Easy with Stellar Converter for EDB

Managing mailbox data is a critical task for any organization running on Microsoft Exchange Server.…

5 days ago

What are the commands to install and uninstall RPM packages in Linux?

The Red Hat Package Manager (RPM) manages software on Linux systems. It uses the .rpm…

7 days ago

Top 11 AI Agents for 2025: Leading the Future of Artificial Intelligence

Ever get the spooky feeling Netflix reads your mind, knowing exactly the perfect show just…

1 week ago

Top 10 JPG to WEBP Conversion Tools You Need to Know

What are JPG and WebP Image Formats? Joint Photographic Experts Group introduced JPG format in…

2 weeks ago