ByteVerse
HomeBlogCategories
AboutContact
Search...
Read Blog
ByteVerse

No-fluff guides on AI tools, coding, and productivity. We test everything before we write about it. Explore tested AI tool reviews, step-by-step coding tutorials, productivity workflows, and 38+ free browser-based developer utilities. All content is hands-on, verified, and written to help you build faster.

Quick Links

  • Home
  • Blog
  • Categories
  • Tools
  • About
  • Contact
  • HTML Sitemap

Categories

  • AI Tools
  • Tech Guides
  • Productivity
  • Coding
  • Software Reviews
  • Cybersecurity

Free Tools

  • JSON Formatter
  • Code Formatter
  • Plagiarism Checker
  • Plagiarism Remover
  • Regex Tester
  • Password Generator

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Contact

© 2026 ByteVerse. All rights reserved.

All tools run 100% client-sidecontact@byteverse.fyi
HomeBlogTech Guides
Tech Guides

Linux & WSL Setup Guide for Windows Devs (2026)

Set up Linux and WSL on Windows in 2026. Complete guide for developers to run Ubuntu, install tools, and code faster.

A
Ali RehmanAuthor
May 21, 2026Updated June 18, 202612 min read
Linux & WSL Setup Guide for Windows Devs (2026) cover image

More in Tech Guides

20 articles
  1. 1Next.js 16 Deployment Guide 2026: Vercel SEO Setup
  2. 2How to Start a Tech Blog in 2026: 17-Step SEO Checklist
  3. 3Website Speed Optimization Checklist 2026
  4. 4Online Security Checklist 2026: Passkeys and 2FA
  5. 5How to Learn Programming in 2026: Complete Beginner Roadmap
  6. 6Docker for Beginners 2026: Complete Getting Started Guide
  7. 7Linux & WSL Setup Guide for Windows Devs (2026)Reading
  8. 8Build a Portfolio Website 2026: Developer Guide
  9. 9Best Free Hosting Platforms for Developers in 2026
  10. 10How to Build a Developer Portfolio Website in 2026
  11. 11Docker for Beginners 2026: Complete Guide
  12. 12LinkedIn for Developers 2026: Get More Job Calls
  13. 13SEO Meta Tags Guide 2026: Titles & Descriptions
  14. 14Affiliate Marketing for Beginners: 10 Steps (2026)
  15. 1510 Steps to Get Traffic to a New Blog (2026)
  16. 1615 Low Competition Keywords for New Blogs (2026)
  17. 17How Many Blog Posts Before Traffic Starts in 2026?
  18. 1890-Day Blog Content Plan for New Websites in 2026
  19. 1950 Blog Post Ideas for New Bloggers in 2026
  20. 20How to Build Topical Authority for a New Blog in 2026
  • 1Complete guide to setting up Linux and WSL on Windows for development
  • 2Covers WSL 2 installation, distro selection, and terminal configuration
  • 3Explains shell customization, package management, and VS Code integration
  • 4Includes Docker on WSL, SSH setup, and performance optimization tips

If you're a developer on Windows, WSL (Windows Subsystem for Linux) is the best thing that happened to your workflow. It gives you a full Linux environment right inside Windows - no dual boot, no virtual machines, no compromises.

This guide walks you through setting up WSL 2 from scratch in 2026, installing essential developer tools, and configuring everything so it works perfectly.

Why WSL 2 in 2026?

Most servers, deployment environments, and DevOps tools run Linux. Docker, Kubernetes, and CI/CD pipelines assume Linux. If you develop on Windows and deploy to Linux, you've probably hit compatibility issues.

WSL 2 solves this by running a real Linux kernel inside Windows:

  • Full Linux compatibility - run bash scripts, Linux binaries, and server software natively
  • Fast file system - WSL 2 uses a real ext4 file system, much faster than WSL 1
  • Docker integration - Docker Desktop uses WSL 2 as its backend
  • VS Code integration - edit files in WSL directly from VS Code
  • No performance hit - near-native Linux performance for development tasks
  • Runs alongside Windows - no rebooting, no virtual machine overhead

Installing WSL 2

Prerequisites

  • Windows 10 version 2004+ or Windows 11
  • Virtualization enabled in BIOS (usually on by default)

One-Command Install

Open PowerShell as Administrator:

powershell
wsl --install

This installs WSL 2 with Ubuntu by default. Restart your computer when prompted.

Choose a Different Distro

Want something other than Ubuntu?

powershell
# Linux & WSL Setup Guide for Windows Devs (2026)
wsl --list --online

# Install a specific one
wsl --install -d Debian
wsl --install -d Ubuntu-24.04

Verify Installation

After restart, Ubuntu will open automatically and ask you to create a username and password. Then verify:

bash
wsl --version
lsb_release -a

Setting Up the Terminal

Windows Terminal (Recommended)

Developer learning with a real project
Modern coding assistants are best used as pair programmers, not autopilot.

Windows Terminal is pre-installed on Windows 11. For Windows 10, install it from the Microsoft Store.

Configure it as your default terminal. It supports tabs, split panes, custom themes, and GPU-accelerated rendering.

Essential Terminal Settings

Open Windows Terminal settings (Ctrl+,) and set:

  • Default profile: Ubuntu (or your WSL distro)
  • Starting directory: //wsl$/Ubuntu/home/yourusername
  • Font: JetBrains Mono or Cascadia Code (ligature support)
  • Color scheme: One Half Dark or Dracula

Oh My Bash (Optional)

For a better-looking prompt:

bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"

Essential Developer Tools

Update System First

bash
sudo apt update && sudo apt upgrade -y

Install Build Essentials

bash
sudo apt install build-essential curl wget git unzip -y

Git Configuration

If you've followed our Git and GitHub beginners guide, you know the basics. Set up Git in WSL:

bash
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
git config --global core.autocrlf input
git config --global init.defaultBranch main

The core.autocrlf input setting is critical - it prevents Windows line-ending issues when working across WSL and Windows.

SSH Key for GitHub

bash
ssh-keygen -t ed25519 -C "your@email.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub

Copy the output and add it to your GitHub account → Settings → SSH Keys.

Installing Node.js

Using NVM (Recommended)

Never install Node.js with apt - use NVM for version management:

bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
source ~/.bashrc

# Install latest LTS
nvm install --lts
nvm use --lts

# Verify
node --version
npm --version

Enable Corepack for pnpm/yarn

bash
corepack enable
corepack prepare pnpm@latest --activate

Installing Python

bash
sudo apt install python3 python3-pip python3-venv -y

![Engineer reviewing a software project](https://images.pexels.com/photos/3861964/pexels-photo-3861964.jpeg?auto=compress&cs=tinysrgb&w=1600 "AI coding workflows still need tests, review, and clear architecture.")

# Verify
python3 --version
pip3 --version

# Create alias for convenience
echo "alias [python](/blog/python-ai-agent-tutorial-2026-langgraph-rag-tools)=python3" >> ~/.bashrc
echo "alias pip=pip3" >> ~/.bashrc
source ~/.bashrc

Docker in WSL 2

Docker and WSL 2 work together perfectly. If you're following our Docker beginners guide, here's how to set it up on WSL:

Option 1: Docker Desktop (Easiest)

  1. Install Docker Desktop for Windows
  2. Go to Settings → General → enable "Use WSL 2 based engine"
  3. Go to Settings → Resources → WSL Integration → enable your distro

Now docker commands work directly from your WSL terminal.

Option 2: Docker Engine in WSL (No Desktop)

bash
# Add Docker's official GPG key
sudo apt install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

# Add the repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable" | sudo tee /etc/apt/sources.list.d/docker.list

# Install
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -y

# Add your user to docker group
sudo usermod -aG docker $USER

VS Code + WSL Integration

This is where things get magical. Install the right VS Code extensions and then:

Programmer debugging code in an office
The fastest learning happens when examples turn into real projects.

  1. Install the WSL extension in VS Code
  2. Open any project from WSL: code . in your WSL terminal
  3. VS Code opens with a remote connection to WSL

All extensions, terminal, and file operations now run inside Linux. You get the best of both worlds - Windows UI with Linux backend.

Recommended Workflow

bash
# Store all projects inside WSL (not /mnt/c/)
mkdir -p ~/projects
cd ~/projects
git clone your-repo
code .

Important: Keep your code inside the WSL file system (~/projects), not on the Windows drive (/mnt/c/). File operations are 5-10x faster on the native Linux file system.

Database Setup

PostgreSQL

bash
sudo apt install postgresql postgresql-contrib -y
sudo service postgresql start

# Create a user
sudo -u postgres createuser --interactive
# Answer the prompts

# Create a database
sudo -u postgres createdb mydb

MongoDB

bash
# Import MongoDB public key
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg

# Add repo and install
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt update
sudo apt install mongodb-org -y
sudo systemctl start mongod

Performance Optimization

WSL Memory Limit

WSL 2 can consume a lot of RAM. Create .wslconfig in your Windows home folder (C:\Users\YourName\.wslconfig):

ini
[wsl2]
memory=4GB
processors=4
swap=2GB

Then restart WSL:

powershell
wsl --shutdown

File System Performance

  • Always work inside ~/projects (Linux file system)
  • Avoid accessing /mnt/c/ for active development
  • Use git to sync files between systems if needed

Common Issues and Fixes

DNS Resolution Fails

Developer learning with a real project
Modern coding assistants are best used as pair programmers, not autopilot.

bash
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf

Clock Drift

bash
sudo hwclock -s

Service Won't Start

WSL doesn't use systemd by default. Enable it:

bash
echo -e "[boot]\nsystemd=true" | sudo tee /etc/wsl.conf

Then restart WSL from PowerShell: wsl --shutdown

Frequently Asked Questions

Is WSL 2 as fast as native Linux?

For most development tasks, yes. File I/O on the Linux file system is near-native speed. The main performance difference is in GPU-heavy tasks.

Can I run GUI apps in WSL?

Yes. WSL 2 on Windows 11 supports Linux GUI apps natively through WSLg - you can run browsers, file managers, and even IDEs.

Should I use WSL or just install Linux?

If you need Windows for daily use (Office, Adobe, gaming), WSL gives you the best of both worlds. If you're fully committed to Linux, a native install is slightly faster.

Final Thoughts

WSL 2 turns Windows into a legitimate development machine. You get a real Linux environment without any dual-boot hassle, and the VS Code integration makes it feel completely native.

Set it up once, configure your tools, and you'll have a development environment that matches what most companies use in production. No more "works on my machine" problems.


Keep Reading

If you found this helpful, check out these related guides:

  • Best VS Code Extensions
  • Best Laptops for Coding
  • How to Learn Programming
  • Docker for Beginners

Share this article

Written by

Ali Rehman

Author at ByteVerse

A Full Stack Developer and Tech Writer specializing in React.js, Next.js, and modern JavaScript, sharing insights on web development, frontend technologies, backend APIs, and scalable applications.

View all posts

Recommended Tools

All Tools

JSON Formatter

Format & validate JSON

Try it free

JSON to CSV

Convert JSON data to CSV

Try it free

Markdown to HTML

Convert Markdown to HTML

Try it free

You Might Also Like

All Posts
How to Write SEO-Friendly Blog Posts in 2026 (Step by Step)

How to Write SEO-Friendly Blog Posts in 2026 (Step by Step)

July 7, 202611 min read
How to Do Keyword Research for Free in 2026 (Step by Step)

How to Do Keyword Research for Free in 2026 (Step by Step)

July 6, 202610 min read
How to Do a Free SEO Audit for Your Website in 2026

How to Do a Free SEO Audit for Your Website in 2026

July 1, 202612 min read