Updated: 11 October 2026 · Applies to: Windows Subsystem for Linux (WSL 2) on Windows 10 version 2004 and later, Windows 11 and Windows Server 2022 and 2025, according to Microsoft’s documentation; the Windows steps were not tested here

The easiest way to run Linux on Windows 10 or 11 is the Windows Subsystem for Linux (WSL). Open PowerShell as administrator, run wsl --install and restart. Windows then has a full Ubuntu system with bash, apt and the usual Linux tools, and you can run Linux apps, including graphical ones, next to your Windows apps. There is no separate virtual machine to manage and no dual boot.

Ways to run Linux on Windows

  • WSL 2 (this guide): a real Linux kernel in a lightweight virtual machine that Windows manages for you. Best for the command line, development tools and single Linux apps.
  • A virtual machine (Hyper-V, VirtualBox and similar): a complete Linux desktop in a window. More set-up and more memory, but fully separate from Windows.
  • Dual boot: Linux gets the whole PC, but you restart to switch systems.
  • A Linux server or VPS: for anything that must run around the clock with a public IP address. You manage it over SSH, and WSL is a good place to do that from (step 6).

1. Check the requirements

  • Windows 10 version 2004 or later (build 19041 or higher) or Windows 11. Check with winver. Older builds need Microsoft’s manual install steps. Windows Server 2022 and 2025 also support wsl --install.
  • Hardware virtualization switched on in the BIOS or UEFI, see enable Intel VT-x or AMD-V. According to Microsoft, WSL 2 also needs a CPU with SLAT, so very old processors such as the Core 2 Duo cannot run it.
  • Windows 10 has reached the end of support: Microsoft only sends security updates to PCs enrolled in its Extended Security Updates (ESU) programme. WSL works the same on Windows 11.

2. Install WSL and Ubuntu

  1. Search for PowerShell in the Start menu, right-click it and choose Run as administrator.
  2. Run:
    wsl --install
  3. Restart Windows when asked.
  4. Open Ubuntu from the Start menu. The first start takes a while because the files are unpacked. Then create a Linux user name and password. They have nothing to do with your Windows login, this user can run sudo, and nothing appears on screen while you type the password.

According to Microsoft, wsl --install enables the WSL and Virtual Machine Platform features, installs the latest Linux kernel, makes WSL 2 the default and installs Ubuntu. The command only works when WSL is not installed yet; if it just prints the help text, WSL is already there and you add a distribution as in step 3. Forgot the Linux password? Run wsl -u root in PowerShell, then passwd yourname.

3. Choose another Linux distribution

wsl --list --online          # distributions you can install
wsl --install -d Debian      # install one by name
wsl --list --verbose         # installed ones, running or stopped, WSL 1 or 2
wsl --set-default Debian     # the one plain "wsl" starts

If the download hangs at 0.0%, Microsoft suggests wsl --install --web-download -d <name>. To start a specific one without changing the default: wsl --distribution Debian.

4. Use Linux in Windows

sudo apt update && sudo apt upgrade
sudo apt install openssh-client rsync

Windows does not update your Linux distribution for you, so run the first line now and then.

  • Your Windows drives are mounted under /mnt: C:\Users\you is /mnt/c/Users/you.
  • Keep Linux projects in your Linux home folder (/home/you), not under /mnt/c. Microsoft recommends this for speed.
  • Open the current Linux folder in File Explorer with explorer.exe ., or type \\wsl$ in the Explorer address bar to see all distributions.
  • Run Linux commands straight from PowerShell with wsl, for example wsl ls -la or dir | wsl grep log, and Windows programs from Linux by adding .exe, for example notepad.exe .bashrc.

5. Run Linux apps on Windows

WSL also runs Linux programs with a window (X11 and Wayland apps). According to Microsoft this needs Windows 10 build 19044 or later or Windows 11, a WSL 2 distribution, and a current graphics driver from Intel, AMD or NVIDIA for hardware acceleration. On an older WSL install, run wsl --update and then wsl --shutdown first.

  1. Install the app inside Ubuntu, for example a text editor, GIMP or the small X11 test tools:
    sudo apt install gnome-text-editor
    sudo apt install gimp
    sudo apt install x11-apps
  2. Start it from the Linux command line (gimp, xeyes), or from the Windows Start menu, where installed apps appear under the distribution name.
  3. Linux app windows can be pinned to the taskbar and work with Alt+Tab and copy and paste, like Windows apps.

Microsoft notes that this is not a full Linux desktop: it relies on the Windows desktop, so desktop-focused tools may not be supported. If you need a whole Linux desktop, use a virtual machine instead.

6. Use it to manage your server

WSL is a handy place to work with a Linux server from a Windows PC, with the same tools you use on the server:

ssh root@203.0.113.10
rsync -avz ./site/ deploy@203.0.113.10:/var/www/site/
scp backup.tar.gz root@203.0.113.10:/root/

Create an SSH key inside WSL with ssh-keygen -t ed25519 and copy it to the server with ssh-copy-id, see set up SSH keys for authentication. If you prefer to stay in plain Windows, OpenSSH is built in there too: create SSH keys on Windows.

Services, systemd and memory

  • According to Microsoft, systemd is the default for the current Ubuntu that wsl --install installs. Other distributions need [boot] and systemd=true in /etc/wsl.conf, followed by wsl --shutdown in PowerShell. If systemctl does not work, see systemctl: command not found on WSL.
  • Services do not keep WSL running: Microsoft notes that systemd services will not keep a WSL instance alive, and an idle distribution is shut down after a short time.
  • By default the WSL 2 virtual machine may use up to 50% of the PC’s memory. To limit it, create %UserProfile%\.wslconfig with a [wsl2] section and a line such as memory=4GB, or use the WSL Settings app from the Start menu, then run wsl --shutdown.

Useful WSL commands

  • wsl --status and wsl --version: default distribution, kernel and WSL version.
  • wsl --update: update WSL itself.
  • wsl --shutdown: stop all distributions and the WSL virtual machine, for example after changing settings.
  • wsl --set-version Ubuntu 2: move a distribution from WSL 1 to WSL 2 (GUI apps and systemd need WSL 2).
  • wsl --export Ubuntu ubuntu.tar and wsl --import: back up a distribution to a file and restore it.
  • wsl --unregister Debian: remove a distribution. This deletes all its files, so copy out anything you need first.

If the installation fails

  • 0x80370102 (“The virtual machine could not be started because a required feature is not installed”) or 0x80070003: enable the Virtual Machine Platform Windows feature and virtualization in the BIOS, then restart.
  • WslRegisterDistribution failed with error 0x8007019e: the Windows Subsystem for Linux feature is not enabled. Turn it on in Turn Windows features on or off.
  • Windows itself running in a virtual machine: WSL 2 then needs nested virtualization from the host.

Looking for the opposite, Windows programs on a Linux PC? One way is to run Windows in a virtual machine, see virtual machine software for Linux.

WSL is meant for your own PC. When Linux has to run around the clock with a public IP address, for a website, a bot or a game server, use a KVM VPS instead.

Official documentation: Install WSL, run Linux GUI apps with WSL, basic commands for WSL and troubleshooting WSL.

Ucartz services for this topic

  • Hire an expert: engineers per 15 minutes, per hour or per month, with no contract.
  • Server management: on-demand administration, hardening, migrations and monitoring.
Was this answer helpful? 0 Users Found This Useful (0 Votes)