Development

WSL2 Ubuntu: My Windows Developer Experience After 4 Years on macOS

Asep Alazhari

After 4 years of macOS development, I returned to Windows and discovered WSL2 Ubuntu. Here's my honest experience with the challenges and solutions.

WSL2 Ubuntu: My Windows Developer Experience After 4 Years on macOS

The Great Return: When Life Forces You Back to Windows

Picture this: You’re a developer who’s been living in the macOS ecosystem for four solid years. Every command, every shortcut, every development workflow has been perfectly tuned to that Unix-like environment. Then life happens, maybe it’s a new job requirement, budget constraints, or simply wanting to explore gaming again, and suddenly you’re staring at a Windows desktop like it’s an alien spacecraft.

That’s exactly where I found myself three months ago. After years of seamless terminal experiences, elegant package management with Homebrew, and that beautiful Unix-like command structure, I was back to Windows. The culture shock was real.

The first week was rough. I kept reaching for Cmd+Space to open Spotlight, only to accidentally trigger Windows’ screenshot tool. My muscle memory was completely out of sync, and don’t get me started on trying to use PowerShell after years of loving Zsh with Oh My Zsh customizations.

But here’s the thing about being a developer: we adapt, we overcome, and sometimes we discover solutions that surprise us. Enter WSL2 (Windows Subsystem for Linux 2) with Ubuntu 22.04, a combination that transformed my Windows development experience from frustrating to actually enjoyable.

Why Terminal Muscle Memory Matters More Than You Think

When you’ve spent years typing commands like brew install, ls -la, and grep -r "searchterm" ., switching to PowerShell’s Get-ChildItem and Select-String feels like learning a foreign language. It’s not just about different syntax, it’s about breaking workflows that have become second nature.

During my macOS years, I had developed a terminal-centric workflow that relied heavily on:

  • Package management with Homebrew for everything from Node.js to ImageMagick
  • Git workflows with custom aliases and Oh My Zsh themes that displayed branch status
  • File navigation using command-line tools like fd, ripgrep, and bat
  • Development servers managed through terminal sessions with tmux multiplexing

The thought of rebuilding all of this in PowerShell or Command Prompt felt overwhelming. I had heard whispers about WSL during my Windows days four years ago, but back then it seemed like an experimental curiosity rather than a serious development solution.

Discovering WSL2: The Game Changer I Didn’t Know I Needed

WSL2 isn’t just “Linux compatibility on Windows”, it’s a full Linux kernel running inside Windows with near-native performance. Unlike the original WSL, which translated Linux system calls to Windows equivalents, WSL2 runs actual Linux distributions in a lightweight virtual machine that feels completely integrated with Windows.

After some research, I decided to install Ubuntu 22.04 LTS. The installation process was surprisingly straightforward:

# Enable WSL feature in Windows
wsl --install

# Install Ubuntu 22.04
wsl --install -d Ubuntu-22.04

# Set WSL2 as default version
wsl --set-default-version 2

Within minutes, I had a full Ubuntu environment running inside Windows. But the real magic happened when I opened Windows Terminal and saw that familiar bash prompt. Suddenly, I could use apt, curl, and all my beloved command-line tools again.

The psychological relief was immediate. I was back in my element, with access to the terminal environment I knew and loved.

Also Read: Build Global Custom Slash Commands (Claude & Gemini)

The Two Major Roadblocks (And How I Solved Them)

Problem 1: Glacial Performance When Accessing Windows Files

My first instinct was to clone my projects into my Windows Documents folder and access them from WSL2. Big mistake. File operations were painfully slow, what should have been instant npm install commands were taking 3-4 times longer than expected.

The issue stems from the overhead of cross-system file access. When WSL2 accesses Windows filesystem paths (like /mnt/c/Users/username/Documents), it has to translate between Linux and Windows file systems, creating significant performance bottlenecks.

The Solution: Work Native, Think Local

The fix was conceptually simple but required a mindset shift: keep everything inside the WSL2 filesystem. Instead of working in Windows directories, I moved my entire development workflow into Ubuntu’s home directory:

# Clone projects directly into WSL2 filesystem
cd ~
mkdir projects
cd projects
git clone https://github.com/username/my-project.git

# Install dependencies natively in WSL2
cd my-project
npm install  # Now runs at native Linux speed

This approach delivered dramatic performance improvements. File operations became snappy again, and build processes returned to expected speeds. The key insight: WSL2 performs best when you treat it as a complete Linux environment rather than a Windows enhancement.

To make this workflow seamless, I installed the “Remote - WSL” extension in VS Code, which allows me to open WSL2 projects directly from Windows. VS Code runs in Windows but connects to the WSL2 environment, giving me the best of both worlds.

Problem 2: The Image Paste Nightmare

The second major frustration emerged when I started using AI development tools like Claude Code and Gemini CLI. On macOS, I could screenshot any error, design mockup, or UI element and paste it directly into the terminal with Cmd+V. This workflow was crucial for my AI-assisted development process.

In Windows Terminal with WSL2, Ctrl+V simply didn’t work for images. I could paste text, but images would either fail silently or produce error messages. This broke my workflow of quickly sharing visual context with AI tools for debugging and development assistance.

The Solution: Claude Image Paste VS Code Extension

After some research, I discovered the “Claude Image Paste” extension for VS Code. This extension bridges the gap between Windows clipboard image handling and terminal applications running within VS Code:

Claude Image Paste extension in VS Code marketplace showing installation details and features The Claude Image Paste extension in VS Code marketplace - a VS Code extension designed for Windows with WSL that enables seamless image pasting into terminals for Claude Code conversations

The extension can be installed directly from the VS Code Extensions marketplace by searching for “Claude Image Paste” or using the identifier agg4code.claude-image-paste.

With this VS Code extension installed, Ctrl+V works exactly as expected in WSL2 terminals running within VS Code. I can now screenshot Windows applications, copy images from browsers, or capture error dialogs and paste them directly into Claude Code sessions running in my Ubuntu environment through VS Code’s integrated terminal.

The extension works by temporarily saving clipboard images to a shared directory that both Windows and WSL2 can access, then providing the file path to the terminal application. It’s seamlessly integrated into the VS Code workflow and makes image sharing with AI tools feel natural and efficient.

The Unexpected Benefits of WSL2 Development

Beyond solving my initial problems, WSL2 has delivered some surprising advantages:

Unified Development Environment

Having both Windows and Linux environments on the same machine means I can:

  • Run Linux development servers in WSL2
  • Use Windows-native tools like Figma, Photoshop, or desktop applications
  • Access both environments simultaneously without dual-booting or VMs

Better Resource Management

Unlike running a full Linux VM, WSL2 dynamically allocates memory and CPU resources. When I’m not actively developing, it uses minimal system resources, but scales up automatically when running intensive tasks like webpack builds or Docker containers.

Native Docker Integration

Docker Desktop for Windows integrates seamlessly with WSL2, providing better performance than the previous Windows implementation. Containers run with Linux-native performance while being manageable from Windows.

# Docker works natively in WSL2
docker run -p 3000:3000 my-node-app

# Containers can be managed from Windows Docker Desktop
# But run with native Linux performance

Tools and Workflow Optimizations

To maximize the WSL2 experience, I’ve assembled a toolkit that bridges Windows and Linux seamlessly:

Essential Windows Terminal Setup

Windows Terminal has become surprisingly powerful. My configuration includes:

{
    "defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
    "profiles": {
        "list": [
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "name": "Ubuntu-22.04",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": "//wsl$/Ubuntu-22.04/home/username",
                "colorScheme": "One Half Dark"
            }
        ]
    }
}

VS Code WSL Integration

The Remote-WSL extension makes VS Code feel native to both environments:

# Open WSL2 projects directly from Windows
code .  # In WSL2 terminal opens the project in Windows VS Code

# Extensions run in WSL2 environment
# IntelliSense, debugging, terminal all work natively

File Management Strategy

I maintain a clear separation between Windows and Linux files:

  • WSL2 (~/projects/): All development projects, Node.js apps, Python scripts
  • Windows (C:\Users\username\): Documents, design files, Windows-specific tools
  • Shared (/mnt/c/shared/): Large files, media assets, project exports

Also Read: GitHub Copilot Limit Hit? Claude Code to the Rescue!

Performance Comparison: Real-World Numbers

To quantify the performance differences, I tested identical operations across different setups:

Build Time Comparison (React + TypeScript project)

  • WSL2 native filesystem: 45 seconds
  • WSL2 accessing Windows files: 127 seconds
  • Native Windows (PowerShell): 52 seconds
  • macOS (for reference): 41 seconds

File Operations (10,000 small files)

  • WSL2 native: 2.3 seconds
  • WSL2 → Windows filesystem: 8.7 seconds
  • Windows PowerShell: 3.1 seconds

The numbers clearly show that keeping projects in WSL2’s native filesystem delivers performance competitive with dedicated Unix systems.

The Learning Curve: What I Wish I’d Known Earlier

1. Embrace the Dual Nature

Don’t try to make WSL2 feel exactly like macOS or native Linux. Instead, learn to leverage both Windows and Linux strengths. Use Windows for visual tools and WSL2 for development.

2. Memory Management Matters

WSL2 can consume significant RAM. Configure limits in .wslconfig if needed:

[wsl2]
memory=8GB
processors=4

3. Backup Strategy

Since WSL2 stores everything in a virtual disk, regular backups are crucial:

# Export WSL2 distribution
wsl --export Ubuntu-22.04 ubuntu-backup.tar

# Import when needed
wsl --import Ubuntu-Restored ./ubuntu-restored ubuntu-backup.tar

One Week Later: An Honest Assessment

After one week of daily development in this setup, I can honestly say WSL2 has exceeded my expectations. The initial learning curve was steep, but the payoff has been substantial.

What Works Brilliantly:

  • Terminal experience that matches macOS/Linux quality
  • Seamless integration between Windows and Linux tools
  • Performance that rivals native Unix systems (when done right)
  • Access to both ecosystems without dual-booting

What Still Frustrates:

  • Occasional memory management quirks
  • Some Windows-Linux integration edge cases
  • Learning curve for optimization techniques

The Bottom Line: WSL2 with Ubuntu has made Windows a genuinely viable development platform for Unix-minded developers. It’s not just a compromise, it’s a legitimate alternative that offers unique advantages.

For developers considering a similar transition, my advice is simple: embrace WSL2 fully, don’t try to work around it. When you work with the system rather than against it, the experience can be surprisingly delightful.

The developer landscape has evolved significantly in the past four years. WSL2 represents Microsoft’s serious commitment to courting developers back to Windows, and from my experience, they’ve largely succeeded. Whether you’re returning to Windows like I was, or considering it for the first time, WSL2 Ubuntu deserves serious consideration in your development stack.

Back to Blog

Related Posts

View All Posts »