You can run Ubuntu on Windows 11 in two main ways: Windows Subsystem for Linux (WSL), which is faster and uses fewer resources, or a virtual machine, which gives you a complete separate Ubuntu system

WSL is the simpler choice for most people. It lets you use Ubuntu's command line and tools directly from Windows without restarting your computer or setting up a separate operating system. A virtual machine is better if you want the full Ubuntu desktop experience, need to test software in complete isolation, or want Ubuntu to behave exactly as it would on its own hardware.

Both methods are free. WSL takes about 10 minutes to set up. A virtual machine takes longer — usually 30 minutes to an hour — because you're downloading and installing a complete operating system.

Key Takeaways

  • WSL 2 (Windows Subsystem for Linux 2) is the fastest way to run Ubuntu on Windows 11 and requires only enabling a Windows feature and running one command.
  • Virtual machines like VirtualBox or Hyper-V give you a complete Ubuntu desktop but use more of your computer's memory and storage.
  • WSL works best if you need Ubuntu's command line tools, development environments, or scripting capabilities.
  • A virtual machine is the right choice if you want to test software in isolation or need the full graphical Ubuntu interface.
  • Both methods keep Ubuntu completely separate from your Windows system, so problems in one won't affect the other.

Installing Ubuntu using WSL 2 (the faster method)

Open PowerShell as Administrator. Right-click the PowerShell icon and select "Run as administrator". Then type this command and press Enter:

wsl --install -d Ubuntu

Windows will download and install Ubuntu automatically. This usually takes 5 to 10 minutes depending on your internet speed. When it finishes, you'll see a terminal window open with Ubuntu running. Create a username and password when prompted — these are separate from your Windows login.

After setup completes, you can open Ubuntu anytime by typing "Ubuntu" in the Windows search bar or by typing wsl in PowerShell. Your Ubuntu system will remember your files and settings between sessions.

Installing Ubuntu using a virtual machine with VirtualBox

Download VirtualBox from virtualbox.org — it's free and works on Windows 11. Install it like any other Windows program. Then download the Ubuntu ISO file (the installation file) from ubuntu.com. Choose the latest LTS version, which is the most stable.

Open VirtualBox and click "New" to create a virtual machine. Give it a name like "Ubuntu", set the type to "Linux", and set the version to "Ubuntu (64-bit)". Allocate at least 4 GB of memory (RAM) and 20 GB of storage space. Click through the remaining options and finish.

Right-click your new virtual machine and select "Settings". Go to "Storage", click the empty CD icon, and select the Ubuntu ISO file you downloaded. Start the virtual machine. It will boot from the ISO and walk you through installing Ubuntu. When installation finishes, restart the virtual machine and remove the ISO from the CD drive in Settings.

Installing Ubuntu using Hyper-V (if you have Windows 11 Pro or Enterprise)

Hyper-V is built into Windows 11 Pro and Enterprise editions but not Home. If you have Home edition, use WSL or VirtualBox instead.

Open "Turn Windows features on or off" by searching for it in the Windows search bar. Check the box next to "Hyper-V" and click OK. Windows will install the feature and ask you to restart your computer.

After restart, open Hyper-V Manager. Click "New" and then "Virtual Machine". Give it a name, allocate at least 4 GB of memory, create a virtual hard disk of at least 20 GB, and attach the Ubuntu ISO file you downloaded. Start the machine and follow the Ubuntu installation steps. This process is similar to VirtualBox but slightly faster because Hyper-V is built into Windows.

Choosing between WSL and a virtual machine

Use WSL if you mainly need command-line tools, want to write and test code, or need to run Linux scripts. WSL is lightweight — it uses minimal memory and storage — and integrates smoothly with Windows. You can access your Windows files directly from Ubuntu and vice versa.

Use a virtual machine if you want the full Ubuntu desktop with a graphical interface, need to test how software behaves on a complete Linux system, or want Ubuntu completely isolated from Windows. Virtual machines use more resources but give you the authentic Ubuntu experience.

You can also use both. Many developers run WSL for daily work and keep a virtual machine for testing or learning.

Accessing your Ubuntu system after installation

With WSL, type wsl in PowerShell or search for "Ubuntu" in the Windows search bar to open a terminal. Your home directory in Ubuntu is separate from your Windows home directory, but you can access Windows files at /mnt/c (for your C: drive) or /mnt/d (for your D: drive, and so on).

With a virtual machine, click the machine name in VirtualBox or Hyper-V Manager and click "Start". The Ubuntu desktop will open in a window. You can resize the window or run Ubuntu full-screen. To switch back to Windows, click outside the virtual machine window or press the key combination shown in the menu (usually the right Ctrl key).

Updating Ubuntu after installation

Whether you're using WSL or a virtual machine, update Ubuntu's software as soon as installation finishes. In the Ubuntu terminal or command line, type:

sudo apt updatesudo apt upgrade

The first command checks for available updates. The second installs them. You'll be asked to enter your Ubuntu password. This ensures you have the latest security patches and software versions.

Frequently Asked Questions

Can I run both WSL and a virtual machine at the same time?

Yes. WSL uses very little resources, so you can run it alongside a virtual machine without problems. Many developers do this — using WSL for daily work and a virtual machine for testing or learning.

Will installing Ubuntu slow down Windows 11?

WSL has almost no impact on Windows performance. A virtual machine will use some of your computer's memory and storage while it's running, but Windows itself runs normally. Close the virtual machine when you're not using it to free up those resources.

Can I uninstall Ubuntu if I change my mind?

Yes. For WSL, open PowerShell as Administrator and type wsl --unregister Ubuntu. For a virtual machine, right-click it in VirtualBox or Hyper-V Manager and select "Remove". Your Windows system will be completely unchanged.

Do I need to buy a license for Ubuntu?

No. Ubuntu is free and open-source. You can use it as long as you want without paying anything.

What's the difference between Ubuntu LTS and the regular version?

LTS (Long Term Support) versions receive updates for five years. Regular versions only get updates for nine months. For most people, LTS is the better choice because your system stays supported longer. New LTS versions come out every two years.