🐧 How to Install Ubuntu via WSL on Windows 11 (And Why It’s Better Than VirtualBox or Dual Boot)
If you’re a developer, student, or just Linux-curious, you no longer need to dual boot or use heavy virtual machines to run Ubuntu. Thanks to Windows Subsystem for Linux (WSL), you can run a full Linux environment directly on Windows 11, without rebooting or complex setup.
In this guide, I’ll walk you through how to install Ubuntu using WSL and explain why it’s a superior alternative to VirtualBox or dual booting.
🔧 What Is WSL?
Windows Subsystem for Linux (WSL) is a feature in Windows that allows you to run a real Linux environment—including most command-line tools and software—without leaving Windows.
As of WSL 2, Microsoft includes a full Linux kernel, making it much more powerful and compatible with Linux tools than earlier versions.
🚀 Why Use WSL Instead of VirtualBox or Dual Boot?
Here’s a quick comparison:
Feature | WSL | VirtualBox | Dual Boot |
---|---|---|---|
Boot Time | Instant | Slow | Requires full reboot |
Performance | Near-native | Slower (emulated) | Native |
Resource Usage | Lightweight | Heavy (RAM/CPU) | Medium |
Access to Windows Files | Direct access | Requires shared folders | Not available |
GUI Support (WSLg) | Supported in WSL 2 | Supported | Full desktop |
Setup Difficulty | Very easy | Moderate | Hard (partitioning) |
🖥️ How to Install Ubuntu Using WSL on Windows 11
✅ Step 1: Open PowerShell or Terminal as Admin
Right-click on the Start menu and select “Windows Terminal (Admin)”.
✅ Step 2: Run the WSL Install Command
In the terminal, type the following:
wsl --install
This command will:
- Enable WSL features
- Download and install Ubuntu (default)
- Set WSL 2 as the backend
Wait for the installation to complete and restart your PC if prompted.
✅ Step 3: Set Up Ubuntu
After rebooting, a terminal window will launch automatically. It will finish setting up your Ubuntu environment. You’ll be asked to create a username and password for Linux.
That’s it—you’re now running Ubuntu on Windows!
🐧 Bonus: Install Other Linux Distributions
To list all available Linux distros:
wsl --list --online
To install another one (like Debian, Kali, Fedora, etc.):
wsl --install -d <DistroName>
🛠️ Use Case Examples
- Run Python, Node.js, or Ruby without dual installs
- Use
apt
,git
,ssh
,curl
, and Linux tools inside Windows - Mount and explore your C drive from Ubuntu:
cd /mnt/c
- Use Visual Studio Code’s Remote – WSL extension to code directly in Ubuntu
📈 Final Thoughts: Why WSL Is a Game-Changer
If you’re working on:
- Web development
- DevOps or scripting
- Learning Linux basics
- Building cross-platform apps
WSL is the best way to run Linux in Windows. It’s fast, efficient, and doesn’t require the hassle of full virtualization or rebooting.
🔗 Helpful Resources
💬 Have questions or tips to share?
Drop them in the comments below or tweet me your setup! 👇
🔔 Don’t forget to follow for more hands-on tutorials like this.
Check out games that developed only html,css and javascript pacman