A complete guide to windows subsystem for Linux
Linux

Written By: Samuel Mkamanga

Last Update: Tue Mar 03 2026


A complete guide to windows subsystem for Linux (WSL): Installation and its use cases

Every developer working on a windows machine will have to use Linux at some point, most cloud platforms and VPS’s run on Linux distro’s so you may need to replicate the same environment on your local machine.

Instead of setting up a virtual machine or dual booting, WSL lets you run a full Linux environment directly inside your windows: its fast, lightweight and deeply integrated with your windows OS.

This Article covers

•
What WSL is
•
How to Install it
•
How to set it up
•
Real-world use case’s
•
Why it is so useful in software development

What is Windows Subsystem for Linux?

Windows Subsystem for Linux (WSL) is a feature of Microsoft Windows that allows you to run a GNU/Linux environment directly on Windows without using a virtual machine.

There are two versions:

•
WSL 1 – Translation layer between Linux and Windows
•
WSL 2 – Uses a lightweight virtual machine with a real Linux kernel (recommended)

WSL 2 offers better performance, full system call compatibility, and Docker support.

Step by step installation of WSL

Step 1: Requirements

You must have:

•
Windows 10 or Windows 11
•
Virtualization enabled in your BIOS
•
Administrator Rights

Step 2: Quick Installation (Recommended)

Open PowerShell as Administrator and run:

powershell
1wsl –install

This command will:

•
Enable required Windows features
•
Install WSL 2
•
Download the default Linux distribution (usually Ubuntu)
•
Set WSL 2 as default
•
Restart your computer if prompted.

Step 3: Check WSL Version

After installation is completed run this command to check the version:

powershell
1wsl --list –verbose

To set WSL 2 as default :

powershell
1wsl --set-default-version 2

Step 4: Installation of a specific Linux Distributions

You can install distributions from the Microsoft Store:

Popular choices include:

•
Ubuntu
•
Debian
•
Kali Linux
•
openSUSE

Or via command line:

powershell
1wsl --install -d Ubuntu

First-Time Setup and Customization

After installation:

•
Launch your Linux distro
•
Create a UNIX username and password
•
Update packages:
powershell
1sudo apt update && sudo apt upgrade

You now have a fully functional Linux environment inside Windows, you can go on to installing all useful tools you need such as git, node.js, java etc.

Accessing Files Between Windows and Linux

From Linux → Windows

Windows drives are mounted under:

javascript
1/mnt/c
2/mnt/d

Example:

javascript
1cd /mnt/c/Users/MyUserName/Documents

From Windows → Linux

Linux files are located at:

javascript
1\\wsl$\

Open File Explorer and type:

javascript
1\\wsl$\Ubuntu

Real-World Use Cases of WSL

1 Web Development

If you're using:

•
Node.js
•
Python
•
PHP
•
Ruby
•
PostgreSQL
•
MySQL

WSL provides a native Linux development experience while still using Windows tools like:

•
Visual Studio Code (with WSL extension)

This is especially useful when deploying to Linux servers.

2 Docker & Container Development

WSL 2 integrates seamlessly with:

•
Docker

Docker Desktop uses WSL 2 as its backend, giving near-native Linux container performance.

3 DevOps & Cloud Engineering

Perfect for working with:

•
Git
•
SSH
•
Terraform
•
Ansible
•
Kubernetes CLI tools

If you're working with Linux-based cloud environments (AWS, Azure, etc.), WSL ensures command compatibility.

4 Cybersecurity & Penetration Testing

Using:

•
Kali Linux

Security professionals can run tools like:

•
Nmap
•
Metasploit
•
Wireshark

Without installing a full VM.

5 Data Science & Machine Learning

Install:

•
Python
•
Jupyter
•
TensorFlow
•
PyTorch

Linux-based ML workflows run smoothly inside WSL.

GPU acceleration is supported on Windows 11 with compatible hardware.

6 Running Linux-only Tools

Some tools are Linux-native and don’t run well on Windows:

•
Bash scripts
•
Linux build tools
•
GCC

WSL allows seamless execution without switching operating systems.

WSL vs Virtual Machine

Feature

WSL 2

Traditional VM

Performance

Very fast

Slower

Boot time

Instant

Slow

Memory usage

Lightweight

Heavy

Integration with Windows

Excellent

Limited

GUI Support

Yes (WSLg)

Yes

WSL is ideal for development. VMs are better for full OS isolation.

Advanced Features

WSLg (Linux GUI Apps)

On Windows 11, WSL supports GUI Linux apps like:

•
Gedit
•
GIMP
•
Linux browsers

No extra configuration needed.

Multiple Distributions

You can install and run multiple Linux distros simultaneously:

powershell
1wsl --list --online

Export & Import Distros

Backup your distro:

powershell
1wsl --export Ubuntu ubuntu-backup.tar

When Should You Use WSL?

Use WSL if you:

•
Develop for Linux servers
•
Work with Docker
•
Need Linux CLI tools
•
Want a hybrid Windows/Linux workflow
•
Are learning Linux

When NOT to Use WSL

Avoid WSL if you need:

•
Full Linux kernel customization
•
Heavy system-level virtualization
•
Strict OS isolation (use a VM instead) or dual booting

Final Thoughts

Windows Subsystem for Linux bridges the gap between Windows and Linux development environments.

For modern developers — especially those working with:

•
Cloud systems
•
Web backends
•
DevOps pipelines
•
Containers

WSL is no longer optional — it’s essential.

If you are interested in learning more about Programming and Building project’s feel free to contact me below I give one on one lecture’s online on Google meet.

Written By: Samuel Mkamanga

Last Update: Tue Mar 03 2026