What Is WSL?
Windows Subsystem for Linux (WSL) lets you run a real Linux environment directly on Windows — no virtual machine, no dual boot. You get a full Linux terminal with access to all the standard commands like ls, cd, grep, and git.
For anyone learning the terminal, WSL is the easiest way to get a Linux environment up and running on a Windows machine.
WSL 2 is the current version and runs an actual Linux kernel. It's fast, lightweight, and compatible with nearly all Linux software.
System Requirements
Before you begin, make sure your system meets these requirements:
- Windows 10 version 2004 or later (Build 19041+), or Windows 11
- A 64-bit processor with virtualization support
- At least 4 GB of RAM (8 GB recommended)
To check your Windows version, press Win + R, type winver, and press Enter.
If you're on an older version of Windows 10, you'll need to update before WSL will work. Go to Settings > Update & Security > Windows Update to check for updates.
Installing WSL
Open PowerShell as Administrator
Right-click the Start button and select Terminal (Admin) or Windows PowerShell (Admin).
Run the install command
Type the following command and press Enter:
wsl --installThis single command enables WSL, downloads the Linux kernel, and installs Ubuntu as the default distribution. It handles everything automatically.
Restart your computer
After the installation finishes, restart your computer when prompted. WSL needs a reboot to complete the setup.
Set up your Linux user
After restarting, Ubuntu will launch automatically and ask you to create a username and password. This is your Linux user account — it's separate from your Windows account.
Enter new UNIX username: yourname
New password:
Retype new password:The password won't show any characters as you type — that's normal Linux behavior. Just type your password and press Enter.
Verifying the Installation
Once you're at the Linux terminal prompt, try a few commands to make sure everything is working:
# Check which Linux distribution you're running
cat /etc/os-release
# Check the current directory
pwd
# List files
ls -la
# Check available disk space
df -h
If these commands produce output without errors, your WSL installation is working correctly.
Understanding the File System
One of the most important things to understand about WSL is how it handles files.
Linux files
Your Linux home directory is at /home/yourname. This is where you should keep your Linux projects and files.
Accessing Windows files from Linux
Your Windows drives are automatically mounted under /mnt/. For example:
C:\drive is at/mnt/c/D:\drive is at/mnt/d/
# Navigate to your Windows Desktop
cd /mnt/c/Users/YourWindowsUsername/Desktop
# List files on your Windows desktop
ls
Accessing Linux files from Windows
You can access your Linux files from Windows Explorer by typing \\wsl$ in the address bar.
For best performance, keep your project files inside the Linux file system (/home/yourname/) rather than on /mnt/c/. Accessing Windows files from Linux is slower due to the file system translation layer.
Setting Up Windows Terminal
Windows Terminal is the recommended way to use WSL. It provides tabs, split panes, and a modern interface.
Install Windows Terminal
If you don't already have it, install Windows Terminal from the Microsoft Store. On Windows 11, it's included by default.
Set Ubuntu as the default profile
Open Windows Terminal, go to Settings > Startup > Default profile, and select Ubuntu. Now every new tab will open in your Linux environment.
Customize your terminal (optional)
In Settings, you can adjust the font, color scheme, and other preferences. A monospace font like Cascadia Code (included with Windows Terminal) works great for terminal use.
Keeping WSL Up to Date
Just like any Linux system, you should regularly update your packages:
sudo apt update && sudo apt upgrade -y
Run this periodically to keep your system secure and up to date.
Useful WSL Commands
Here are some PowerShell commands for managing WSL from Windows:
# List installed distributions
wsl --list --verbose
# Shut down WSL
wsl --shutdown
# Set the default distribution
wsl --set-default Ubuntu
# Check WSL version
wsl --version
Next Steps
Now that you have a Linux terminal ready, you're all set to start learning commands. WebTerm Learn's courses are designed around the same Linux environment you just set up — everything you practice here will work in your WSL terminal too.