Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Windows Subsystem for Linux (WSL) lets you run a Linux distribution, Bash and Linux development tools alongside Windows 11 without dual-booting. For almost every new installation, choose WSL 2: it uses a Linux kernel in a lightweight virtualized environment and is the preferred foundation for modern development, containers and Docker. Windows remains your host operating system, while Ubuntu (or another distribution) has its own users, packages and filesystem.

This guide takes you from hardware checks to a working development setup, then covers storage, networking, systemd, GUI applications, GPU workloads, Docker and the cases where a virtual machine or native Linux is a better choice.

What WSL is—and what it is not

WSL is a Windows feature and a distribution-management environment. Each installed distribution is a separate Linux user space with its own package manager, accounts and files. You can run Linux commands from Windows and Windows programs from Linux, while continuing to use ordinary Windows applications.

WSL 2 is not native Linux, a traditional dual-boot installation or a conventional full virtual machine with independently emulated hardware. Its Linux kernel and virtualized environment provide broad compatibility, but not every kernel feature, device, desktop application or production-server behavior is guaranteed. Windows still controls boot, hardware and system policy. Linux GUI applications are supported through WSLg on suitable Windows 11 and WSL configurations, but WSL is primarily a development and command-line environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

See Microsoft’s installation guidance at learn.microsoft.com/en-us/windows/wsl/install and GUI documentation at learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps.

WSL 1 versus WSL 2

Area WSL 1 WSL 2
Linux compatibility System-call translation layer Linux kernel in a lightweight virtual machine
Linux filesystem performance Can be advantageous for some Windows-file workloads Best when projects stay inside the Linux filesystem
Windows filesystem access Often faster for some workloads Cross-filesystem access can be slower
Containers Not the normal choice Preferred backend
New installations Usually not recommended Recommended default

Workload and file location determine real performance; Microsoft’s comparison is more reliable than blanket claims that one version is always faster: WSL 1 and WSL 2 comparison.

Check prerequisites before installing

  • Windows 11 supports the one-command installation path. The same command supports Windows 10 version 2004 (build 19041) or later.
  • WSL 2 requires hardware virtualization. Intel VT-x or AMD-V/SVM must be enabled in UEFI/BIOS.
  • You need administrator access to enable Windows components. Corporate policies may block optional features, virtualization, Store access or distribution installation.
  • Windows 11 Home can run WSL 2; edition restrictions are more relevant to some Docker Desktop and Windows-container scenarios.

Check your versions and WSL package with:

winver
systeminfo
wsl --version
wsl --status

Output varies by Windows and WSL package version. If the version command is unavailable or old, update WSL with wsl --update. WSL itself has no single universal RAM minimum in Microsoft’s installation documentation. Docker Desktop separately lists an 8 GB RAM requirement, a 64-bit processor with SLAT and virtualization: Docker Windows requirements.

Install WSL 2 and Ubuntu

  1. Open an elevated terminal. Start Windows Terminal, PowerShell or Command Prompt as administrator.
  2. Install WSL and the default distribution.
    wsl --install

    This enables required components, installs the current WSL kernel, sets WSL 2 as the default and normally installs Ubuntu. Restart Windows if prompted.

  3. Choose a distribution deliberately, if needed.
    wsl --list --online
    wsl --install -d Ubuntu

    Use a name exactly as returned by wsl --list --online. Available choices change over time and can include Debian, Kali, openSUSE, Fedora and Alpine.

  4. Complete first launch. Open Ubuntu from Start. Create a Linux username and password. They are independent of your Windows login, and Linux does not display password characters while you type.
  5. Update Ubuntu.
    sudo apt update
    sudo apt full-upgrade -y

    sudo asks for the Linux password created during setup.

  6. Create a Linux-side workspace.
    mkdir -p ~/projects
    cd ~/projects
  7. Verify both sides. From PowerShell run:
wsl --status
wsl --list --verbose

Ubuntu should show version 2. Inside Ubuntu, confirm the distribution with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
uname -a
cat /etc/os-release

Essential WSL commands

Task Command
Start the default distribution wsl
Start a named distribution wsl -d Ubuntu
List installed distributions wsl --list
List distributions and versions wsl --list --verbose
List available distributions wsl --list --online
Shut down all WSL instances wsl --shutdown
Terminate one distribution wsl --terminate Ubuntu
Set the default distribution wsl --set-default Ubuntu
Set the default WSL version wsl --set-default-version 2
Export a backup wsl --export Ubuntu ubuntu-backup.tar
Import a distribution wsl --import <Name> <InstallLocation> <File> --version 2
Run Linux from PowerShell wsl ls -la
Open the current Linux directory in Explorer explorer.exe .
Open it in VS Code code .

Warning: wsl --unregister <Distro> permanently deletes that distribution’s filesystem. Export important data first. Full reference: Microsoft’s basic WSL commands.

Rank #2
Sale
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Use the right filesystem

Linux-heavy projects should normally live in the distribution, for example /home/<username>/projects. Linux tools, compilers and file watchers generally work best there. You can browse that location from Windows with explorer.exe . or a path such as \wsl$Ubuntuhome<username>project.

Windows drives are mounted under /mnt:

cd /mnt/c/Users/<WindowsUser>/Documents

Keep projects intended primarily for Windows tools on the Windows filesystem. Repeatedly crossing between /mnt/c and the Linux filesystem can slow builds and file watching and can expose permission or CRLF/LF line-ending issues. Avoid editing Linux-owned files with tools that do not understand Linux permissions, and do not use chmod 777 as a routine fix. See Microsoft’s WSL development-environment guidance.

Connect Windows tools and Linux tools

Windows Terminal is a convenient host for PowerShell, Command Prompt and multiple WSL profiles. Install Git inside Ubuntu for Linux-side projects and decide whether each repository’s Git commands run in Windows or Linux; mixing credential helpers and line-ending policies casually creates confusing results.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install VS Code on Windows with its WSL extension, then open a Linux project:

code .

The editor uses a remote server inside WSL, so terminals, extensions and language tools operate in the Linux environment.

Rank #3

WSL interoperability works in both directions:

# PowerShell
wsl ls -la
wsl uname -a

# Ubuntu
notepad.exe .bashrc
ipconfig.exe
explorer.exe .

# Pipe a Windows command into Linux
ipconfig.exe | wsl grep IPv4

Be explicit about which environment owns paths, variables and exit codes when writing scripts.

Configure services, resources and networking

Enable systemd when a service needs it

Services such as PostgreSQL, Redis or some Docker-related components may require systemd rather than assuming a traditional Linux boot. Edit the distribution configuration:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo nano /etc/wsl.conf

Add:

[boot]
systemd=true

Then restart WSL from PowerShell and verify:

wsl --shutdown
systemctl list-units --type=service

Behavior depends on your WSL and distribution versions. For a failed service, use systemctl status <service> and journalctl -u <service>. Documentation: systemd in WSL.

Control WSL 2 resources

WSL 2 dynamically manages its virtual machine. To impose user-wide limits, create %UserProfile%.wslconfig:

[wsl2]
memory=8GB
processors=4
swap=4GB

Apply changes with wsl --shutdown. Options vary by WSL version, and overly restrictive limits can break builds or databases. .wslconfig controls WSL 2 globally for your Windows user; /etc/wsl.conf configures one distribution. See WSL configuration.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

Understand networking

Linux applications can usually reach Windows and the internet, and Windows can often reach a WSL service through localhost. Exact behavior depends on Windows build, networking mode, firewall rules and whether the application binds to 127.0.0.1 or 0.0.0.0. Localhost access does not automatically make a service available to other devices on your LAN.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test a simple server:

python3 -m http.server 8000

Open http://localhost:8000 in Windows. If it fails, check the process, listening interface, port conflicts and Windows Firewall. Avoid hard-coding an obsolete WSL IP address. Details: WSL networking documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Optional GUI and GPU workloads

Linux GUI applications

On supported Windows 11 and WSL installations, WSLg integrates compatible Linux GUI applications with the Windows desktop. For a modest test on Ubuntu:

sudo apt update
sudo apt install -y gedit
gedit

Compatibility, graphics drivers and package availability vary; WSLg is not a guarantee that every Linux desktop application or hardware integration will work.

GPU acceleration

GPU workloads require compatible hardware, a current Windows driver supporting WSL virtualization, an up-to-date WSL kernel and application-specific configuration. For NVIDIA workloads, follow the vendor and framework instructions rather than installing a conventional Linux GPU driver blindly inside WSL. Docker’s requirements are documented at Docker GPU support; Ubuntu’s CUDA guidance is at Ubuntu CUDA on WSL. Performance and supported APIs depend on the vendor, driver and workload.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Windows 11 Laptop with i3 Processor 15.6" Work Laptop for College Students
  • 【Efficient Performance】 Powered by Intel Core i3 processor (2 cores, 4 threads, up to 3.4GHz) with 12GB RAM and 256GB SSD. Handles multitasking, office software, online classes, and HD video streaming smoothly. Integrated Intel UHD Graphics 620
  • Backlit Keyboard & Complete Package】Comes with a cool backlit keyboard. Comes with awebcam, dual stereo speakers (8Ω/1.0W each), DC charger, and user manual – ready for late-night studying, online classes, video conferencing, and daily productivity
  • 【Vibrant Display】 15.6-inch Full HD (1920x1080) anti-glare screen with 16:9 aspect ratio delivers crisp images and vivid colors – perfect for studying, watching lectures, or entertainment. Thin-bezel design maximizes viewing area
  • 【Fast Connectivity & Expansion】 Equipped with WiFi 6 (802.11ax) and Bluetooth 5.2 for stable, high-speed wireless. Features 3 x USB 3.0, HDMI 2.1, Type-C (supports PD3.0 fast charging), and a TF card slot expandable up to 2TB – easily connect external monitors, mice, drives, or expand storage for all your files
  • 【Long Battery Life & Portable】 Built-in 11.55V 5000mAh/57.75Wh high-capacity battery delivers approximately 7 hours of mixed-use battery life – enough for a full day of classes and assignments. Lightweight at just 1.63kg (3.6 lbs) and 19.5mm thin, plus a compact packing size – easily slips into a backpack for campus, library, or coffee shop

Use Docker with WSL 2

WSL 2 supplies the Linux environment; it does not install Docker. Docker Desktop is a separate product and the easiest supported route for many Windows developers.

  1. Verify WSL 2 and your distribution.
  2. Install Docker Desktop and select the WSL 2 backend. Its current Windows documentation lists WSL 2.1.5 or later, supported Windows builds and editions, 8 GB RAM, SLAT and firmware virtualization among requirements.
  3. In Docker Desktop, enable WSL integration for the distribution you use.
  4. Test inside Ubuntu:
docker run hello-world

Do not install a second Docker daemon inside Ubuntu without understanding the maintenance and socket conflicts. Docker Desktop’s commercial terms matter: its documentation describes free use for personal use, education, non-commercial open source and qualifying small businesses (fewer than 250 employees and under US$10 million annual revenue), with paid subscriptions for larger commercial organizations and government entities. See Docker installation and licensing details and WSL integration.

Troubleshoot common failures

wsl --install shows help instead of installing

WSL may already be partly installed or the command may not be following the first-install path. List distributions and install explicitly:

wsl --list --online
wsl --install -d Ubuntu

Installation remains at 0%

Use the web-download recovery option:

wsl --install --web-download -d Ubuntu

Virtualization or WSL 2 errors appear

  • Check virtualization status in Task Manager or systeminfo.
  • Enable Intel VT-x or AMD-V/SVM in UEFI/BIOS.
  • Confirm enterprise policy has not disabled virtualization or Virtual Machine Platform.
  • Restart Windows and retry.

A distribution is still WSL 1

wsl --set-version Ubuntu 2
wsl --list --verbose

Conversion can take time; do not interrupt it.

WSL is stuck or will not restart

wsl --shutdown
wsl --update
wsl --list --verbose

Relaunch the distribution. If it persists, consult Microsoft’s troubleshooting guide before unregistering anything.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Builds, file watching or networking are slow

Move Linux-managed code from /mnt/c/Users/<name> into /home/<name>. For networking, verify the service, interface, port, firewall and selected WSL networking mode.

Data was deleted accidentally

wsl --unregister Ubuntu deletes the distribution and its files. Export before risky maintenance:

wsl --export Ubuntu ubuntu-backup.tar

When WSL is the wrong tool

Need Better choice Why
Linux CLI tools while keeping Windows applications WSL 2 Integrated, no reboot and strong development workflow
Maximum Linux hardware access or a full Linux desktop Native Linux or dual boot Closest to complete Linux behavior
Snapshots, isolated virtual hardware and server-like testing Full VM (Hyper-V, VMware or VirtualBox) More explicit isolation and configurable networking
Containers only Docker Desktop or another container platform Focused container workflow rather than general Linux administration
Blocked local hardware or policy Cloud development environment Avoids local virtualization, but adds latency, recurring cost and governance concerns

WSL is a poor fit for production-identical server behavior, specialized direct hardware access, predictable boot-time infrastructure testing, prohibited virtualization environments or workloads that cannot move Linux projects off the Windows filesystem.

Quick Recap

Bestseller No. 1
SaleBestseller No. 2
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$260.00
Bestseller No. 3
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$249.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.