How to Install Ubuntu Using WSL on Windows 11 (Step-by-Step Guide)
Windows Subsystem for Linux (WSL) allows developers and enthusiasts to run a native Linux environment directly on Windows, alongside your usual Windows apps and tools, without the overhead of a traditional virtual machine.
Follow this quick and easy guide to install Ubuntu on Windows 11 using WSL.
Prerequisites
Before getting started, make sure your system meets these requirements:
-
Operating System: Windows 11 (Home, Pro, or Enterprise).
-
Virtualization: Hardware virtualization must be enabled in your computer’s BIOS/UEFI settings.
Step 1: Open PowerShell as Administrator
-
Click the Start button on your taskbar.
-
Type
powershellin the search bar. -
Right-click on Windows PowerShell and select Run as administrator.
Step 2: Install WSL and Ubuntu with a Single Command
Modern versions of Windows 11 make installing WSL incredibly simple. A single command will enable all necessary virtualization features, download the latest WSL kernel, and install Ubuntu by default.
-
In your Administrator PowerShell window, run the following command:
wsl --install
-
Restart your computer when prompted to complete the installation of the core virtualization components.
Step 3: Set Up Your Ubuntu Username and Password
Once your computer restarts, the Ubuntu terminal will automatically launch to complete its setup process:
-
Wait a moment for the installation to finalize.
-
When prompted, type a new UNIX username and press
Enter. -
Enter a password (note that characters won’t show on screen as you type for security reasons) and confirm it.
Congratulations! You now have a fully functional Ubuntu terminal running directly inside Windows 11.
Step 4: Update Your Ubuntu Environment
It is always best practice to update and upgrade your packages immediately after a fresh installation. Run the following commands in your Ubuntu terminal:
sudo apt update && sudo apt upgrade -y
Useful WSL Commands
Keep these handy commands in mind for managing your WSL distributions:
-
List installed distributions:
wsl --list --verbose -
Shut down all WSL instances:
wsl --shutdown -
Open Ubuntu quickly: Just type
ubuntuin any Windows Command Prompt, PowerShell, or the Windows Run dialog (Win + R).