All Tech Guides

Tech Guide

Install Linux on Windows with WSL

An introduction to the Windows Subsystem for Linux (WSL), how to install WSL and Ubuntu on Windows 10 or 11, and a beginner example moving between Linux and Windows files.

Operating Systems Beginner Updated October 2026

Disclaimer & Important Cautions

These Tech Guides and instructions are provided in good faith as a general educational guide. Technology changes over time, and settings, software versions, installation steps, and security practices may vary by system.

I cannot guarantee that these steps will work in every environment, and I am not responsible for data loss, configuration problems, system errors, security issues, downtime, or other problems that may result from following this guide.

  • Back up important files before making system changes.
  • Run PowerShell as administrator only for the installation steps that need it.
  • Be careful with commands that start with sudo or that delete files (rm), especially inside /mnt/c, which is your real Windows drive.
  • Remember your Linux password. It is separate from your Windows password.
  • When in doubt, consult official documentation or a qualified technician.

Overview

The Windows Subsystem for Linux (WSL) lets you run a real Linux distribution, such as Ubuntu, directly on Windows, without a separate virtual machine app or dual-booting. You get a full Linux command line with Linux tools, package managers, and programming languages, alongside your normal Windows apps and files.

The current version, WSL 2, runs a genuine Linux kernel in a lightweight, managed virtual machine that starts in seconds. Microsoft made WSL open source in 2025. WSL is widely used by developers, data scientists, and students who need Linux tools on a Windows computer. In this guide you will install WSL and Ubuntu, then practice using Linux and moving files between Linux and Windows.

Main idea: One command, wsl --install, sets up WSL and Ubuntu. After a restart, you create a Linux username and password and have a working Linux terminal on Windows.

Requirements

  • Windows 11, or Windows 10 version 2004 (build 19041) or later. Windows 10 version 21H2 or later is recommended. To check, press Windows + R, type winver, and press Enter.
  • Hardware virtualization enabled in your computer's UEFI/BIOS (on by default on most computers).
  • Administrator privileges.
  • Internet access and about 2–4 GB of free disk space.

Important Notes

  • WSL works on Windows 10 and 11 Home as well as Pro.
  • WSL is not intended to run inside a Windows virtual machine. Install it on a physical Windows computer.
  • Mac users don't need WSL; macOS's Terminal already provides a Unix command line. For a full Linux system, see the Linux guide.

WSL Installation Instructions

Work through the tabs in order.

Installing WSL and Ubuntu

Click the tabs above in order. Allow about 15–30 minutes, including a restart.

The guide covers these major tasks:

  1. Open PowerShell as administrator.
  2. Run wsl --install.
  3. Restart Windows.
  4. Create your Linux username and password.
  5. Update Ubuntu.
  6. Learn the basic WSL commands.

Beginner Example: Linux and Windows Working Together

Open Ubuntu and type the commands below. Text after # is a comment; you don't need to type it.

Step 1: Look around Linux

whoami                  # your Linux username
pwd                     # your Linux home folder, /home/<username>
cat /etc/os-release     # which Linux distribution and version you are running
uname -r                # the Linux kernel version (it mentions WSL2)

See the Linux guide for more everyday commands such as ls, cd, mkdir, and cp.

Step 2: Create a project in Linux and run a program

Ubuntu includes Python 3. Create a folder and a small Python program:

mkdir -p ~/projects/hello
cd ~/projects/hello
echo 'import platform; print("Hello from", platform.system(), platform.release())' > hello.py
python3 hello.py

Output (your kernel version will differ):

Hello from Linux 6.6.87.2-microsoft-standard-WSL2

Step 3: Open Linux files from Windows

While in the hello folder, run:

explorer.exe .

Windows File Explorer opens the Linux folder. You can also find all your Linux files under Linux in File Explorer's navigation pane, or by typing \\wsl$ in the address bar.

Step 4: Reach Windows files from Linux

Your Windows drives appear in Linux under /mnt. Your C: drive is /mnt/c:

ls /mnt/c/Users                         # Windows user folders
cp hello.py /mnt/c/Users/<YourWindowsName>/Documents/   # copy a file to Windows Documents

Replace <YourWindowsName> with your Windows user folder name from the first command. The file now appears in your Windows Documents folder.

Step 5: Install a Linux tool

Install software with Ubuntu's package manager, exactly as on a regular Linux computer. For example, install tree and the SQLite command-line tool:

sudo apt install tree sqlite3 -y
tree ~/projects
sqlite3 --version
Check yourself: python3 hello.py prints a line ending in WSL2, explorer.exe . opens the folder in File Explorer, and hello.py appears in your Windows Documents folder.

Tips for Working in WSL

  • Keep Linux projects in your Linux home folder (~), not under /mnt/c. Linux tools run much faster on Linux files.
  • Install the WSL extension in Visual Studio Code, then type code . in a Linux folder to edit it in VS Code.
  • To exit Linux, type exit or close the window.

Next Steps

  • Practice more commands with the Linux guide.
  • Install Git inside WSL with sudo apt install git.
  • Install development tools such as Java, PHP, or R inside Ubuntu with apt.
  • Read Microsoft's WSL documentation.
Final Notes:
  • WSL runs a real Linux distribution on Windows 10 and 11, including Home editions.
  • Install it with wsl --install in an administrator PowerShell, then restart.
  • Your Linux username and password are separate from your Windows account.
  • Linux files live in your Linux home folder; Windows files are under /mnt/c.
Explore more technology resources

Return to the complete collection of installation and configuration guides.

Browse All Tech Guides