Linux is a widely used operating system and is quite important for developers.
Luckily, Windows provides a convenient utility for using Linux along side Windows.
This utility is called WSL (Windows Subsystem for Linux).
Its recent version is WSL2 and in this guide we'll discuss it in detail.
https://learn.microsoft.com/en-us/windows/wsl/install-manual
Windows Subsystem for Linux provides a compatibility layer that lets you run Linux binary executables natively on Windows.
WSL2 (Windows Subsystem for Linux version 2) introduces a new architecture that replaces the original WSL design
by using a lightweight virtual machine.
- Runs an actual Linux kernel
- Improves overall performance
- Enhances system call compatibility
Search for "Turn Windows features on or off."
Check the option Windows Subsystem for Linux.
PS C:\Windows\system32> cmd.exe /c ver
Microsoft Windows [Version 10.0.26100.4946]
To install a specific distro, use the command below:
wsl --install -d DISTRO-NAME
For example, to install Debian, the command would be modified as follows:
wsl --install -d Ubuntu-24.04
Follow the prompts and the specific distribution will be installed.
wsl --update
wsl --set-default-version 2
Check the status by launching Windows PowerShell.
wsl --list --verbose
wsl --set-default <Distribution Name>
To set the default Linux distribution that WSL commands will use to run, replace <Distribution Name> with the name of your preferred Linux distribution.
wsl ~
The ~ can be used with wsl to start in the user's home directory.
To jump from any directory back to home from within a WSL command prompt, you can use the command: cd ~.
File System Integration
One of WSL2’s strongest features is its file system integration. Here’s how to make the most of it:
Your Windows drives are automatically mounted under `/mnt/`:
Access C drive
cd /mnt/c
Inside your WSL terminal (e.g., Ubuntu), your Windows drives are mounted under /mnt.
cd /mnt/c/Users/<YourWindowsUsername>/Documents
cd /mnt/c/Users/s2tha/Documents
This gives you access to your Windows Documents folder.
You can list files with:
ls /mnt/c/
wsl --unregister <DistroName>
wsl --list --verbose
wsl --unregister Ubuntu
Benchmark RabbitMQ and Kafka across Windows and WSL 2 environments to evaluate latency, throughput, and cross-platform interoperability.
| Component | Windows Host Role | WSL 2 Role |
|---|---|---|
| Docker Engine | Native or Docker Desktop | Optional (via Docker in WSL) |
| RabbitMQ | Benchmark target or control node | Peer node or isolated test instance |
| Kafka | Zookeeper + Broker on either side | Linux-native performance comparison |
| Messaging Clients | Java/Python/Node.js CLI tools | Cross-platform latency comparison |
- Use
ip routein WSL to identify Windows host IP - Access Windows services from WSL via default gateway
Ensure WSL 2 can reach Windows services:
ip route | grep default
- Licensed under GNU GPL + Classpath Exception, meaning:
- No licensing fees or subscriptions
- Full freedom to modify, redistribute, and audit the source
- Ideal for CI/CD pipelines, containerized deployments, and hybrid cloud setups without legal overhead
- Java 21 is a Long-Term Support (LTS) release, ensuring:
- 8+ years of community updates and security patches
- Enterprise-grade reliability for production systems
- Virtual Threads (Project Loom) for scalable concurrency
- Record Patterns and Pattern Matching for switch for cleaner, expressive code
- Sequenced Collections for predictable iteration order
- Improved JVM performance and GC tuning (G1, ZGC) for low-latency workloads
- Enhanced JEPs (Java Enhancement Proposals) that support:
- Streamlined observability
- Better memory footprint for microservices
- Faster startup and reduced warm-up time—critical for serverless and edge deployments
- Regular community-driven updates ensure:
- Timely patching of CVEs
- Transparent changelogs and reproducibility
- No vendor lock-in—ideal for multi-cloud governance and auditability
- Supported by major platforms:
- AWS Corretto
- Eclipse Temurin
- Azul Zulu
- Spring Boot 3.x
- Jakarta EE 10+
- GraalVM (for native image builds)
sudo apt update
sudo apt install -y openjdk-21-jdk
java -version
javac -version
This installs the latest LTS version available in Ubuntu’s repositories—typically OpenJDK 17 or 21 depending on your distro version2.
wget https://downloads.apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz
tar -xvzf apache-maven-3.9.11-bin.tar.gz
sudo mv apache-maven-3.9.11 /opt/maven
echo "export M2_HOME=/opt/maven" >> ~/.bashrc
echo "export PATH=\$M2_HOME/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
mvn -version
wget https://services.gradle.org/distributions/gradle-9.0.0-bin.zip -P /tmp
sudo unzip -d /opt/gradle /tmp/gradle-9.0.0-bin.zip
echo "export GRADLE_HOME=/opt/gradle/gradle-9.0.0" >> ~/.bashrc
echo "export PATH=\$GRADLE_HOME/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
gradle -v
sudo apt update
sudo apt install -y nodejs npm
node -v
npm -v
sudo apt update
sudo apt install -y python3 python3-pip
python3 --version
pip3 --version