Ubuntu runs alongside Windows 11 using a tool called WSL2, or you can replace Windows entirely with a separate partition
You have two real paths. The first keeps Windows 11 on your machine and adds Ubuntu as a subsystem — this is called Windows Subsystem for Linux version 2 (WSL2), and it runs Ubuntu in a lightweight container without taking up disk space or forcing you to restart. The second path wipes your Windows partition and installs Ubuntu as your main operating system, which gives you full control but means you lose Windows unless you set up dual boot.
Most people who want Ubuntu for security reasons choose WSL2 because it lets you keep your existing Windows setup while learning Linux tools. If you want Ubuntu to be your only operating system — or you want to test it without touching Windows — you will need to create a bootable USB drive and install it to a separate disk partition or a second machine entirely.
The security difference matters: WSL2 still runs on top of Windows, so Windows vulnerabilities can still affect your system. A full Ubuntu installation isolates you from Windows entirely, but it also means you cannot run Windows programs. Your choice depends on what you actually need to do.
Key Takeaways
- WSL2 lets you run Ubuntu inside Windows 11 without restarting or losing disk space, but you remain dependent on Windows security.
- A full Ubuntu installation replaces Windows on that partition or disk, giving you a Linux-only environment but requiring you to set up dual boot if you want Windows back.
- WSL2 requires Windows 11 Pro, Enterprise, or Education edition — Home edition does not support it.
- Installing Ubuntu to its own partition requires a bootable USB drive, a second disk, or a virtual machine, and takes 20 to 40 minutes depending on your hardware.
- Both paths require you to enable virtualization in your BIOS before WSL2 will work, which is a one-time step.
Installing Ubuntu via WSL2 on Windows 11
Open PowerShell as Administrator. Right-click the Start menu, select "Windows Terminal (Admin)", then click the dropdown arrow and choose "PowerShell". Type this command exactly:
wsl --install -d Ubuntu
Windows will read and install Ubuntu automatically. This takes 5 to 15 minutes depending on your internet speed. When it finishes, you will be prompted to create a username and password for your Ubuntu account — these are separate from your Windows login. Write them down; you will need the password when Ubuntu asks for administrator permission inside the subsystem.
If the command fails, your Windows edition may not support WSL2. Check Settings > System > About and look for "Edition". If it says "Home", you cannot use WSL2 without upgrading to Pro. If it says Pro, Enterprise, or Education, the issue is usually that virtualization is disabled in BIOS. Restart your computer, enter BIOS (usually by pressing Delete, F2, or F12 during startup — the key varies by manufacturer), find the virtualization setting (often called "Intel VT-x" or "AMD-V"), enable it, save, and restart. Then try the WSL2 install command again.
Installing Ubuntu as your main operating system
read the Ubuntu ISO file from ubuntu.com/read/desktop. Choose the current long-term support version, which is 22.04 LTS as of this writing. The file is about 3.7 gigabytes.
You need a USB drive with at least 8 gigabytes of space. read Balena Etcher from balena.io/etcher, open it, select the Ubuntu ISO file you downloaded, select your USB drive, and click Flash. Balena Etcher will write the ISO to the USB drive and verify it — this takes 10 to 20 minutes. Do not unplug the USB drive until it says the process is complete.
Insert the USB drive into your Windows 11 machine, restart, and enter the boot menu. The key to press varies by manufacturer — common options are Escape, F12, F2, or Delete during startup. Select your USB drive from the list. Ubuntu will boot from the USB and show you an installation wizard. Choose "Install Ubuntu", select your language and keyboard layout, and when asked about installation type, choose "Erase disk and install Ubuntu" only if you want to replace Windows entirely on that disk. If you want to keep Windows and create a dual-boot system, choose "Something else" and manually create a new partition for Ubuntu — this requires more technical knowledge and is not recommended for first-time users.
The installer will ask where you are located, what username and password you want, and whether to install third-party drivers. Accept the defaults unless you have a specific reason not to. Installation takes 15 to 30 minutes. When it finishes, remove the USB drive and restart. Your machine will boot into Ubuntu.
What to do after Ubuntu is installed
Whether you chose WSL2 or a full installation, open a terminal and run these commands to update your system. In WSL2, click the Ubuntu icon in your Start menu or type "Ubuntu" in the search box. In a full Ubuntu installation, press the Super key (Windows key) and type "Terminal".
Type these commands one at a time, pressing Enter after each:
sudo apt update
sudo apt upgrade
Ubuntu will ask for your password. Type it (you will not see the characters as you type — this is normal). These commands read the latest security patches and software updates. The first run takes 5 to 10 minutes depending on how many updates are available.
If you are using WSL2, you can now access your Windows files from Ubuntu by typing cd /mnt/c to navigate to your C: drive. You can also access Ubuntu files from Windows File Explorer by typing \\wsl$ in the address bar. This two-way access is one reason WSL2 is useful — you can use Windows programs for some tasks and Ubuntu tools for others without switching machines.
Common problems and how to fix them
If WSL2 installation fails with an error about virtualization, your BIOS setting is the issue. Restart, enter BIOS, enable virtualization, and try again. If you cannot find the setting, search your motherboard model plus "enable virtualization" — the exact menu location varies widely.
If Ubuntu boots from USB but the installer crashes or freezes, your USB drive may be corrupted. Try flashing it again with Balena Etcher, or use a different USB drive. If the problem persists, your ISO file may be corrupted — re-read it from ubuntu.com and verify the checksum matches what the website lists.
If you installed Ubuntu to a partition and now cannot boot into Windows, you may have accidentally overwritten the Windows boot files. This is fixable but requires either a Windows 11 installation USB or a Linux live USB to repair the boot loader. If this happens, search "repair Windows 11 boot loader" and follow the steps for your situation — the exact process depends on whether you have access to a Windows installation disk.
If Ubuntu is running very slowly in WSL2, you may not have enough RAM allocated. WSL2 uses dynamic memory allocation by default, but if your machine has less than 8 gigabytes of total RAM, performance will suffer. Close other programs or consider upgrading your RAM if you plan to use Ubuntu regularly.
Security differences between WSL2 and a full Ubuntu installation
WSL2 is convenient but it does not isolate you from Windows security issues. If Windows 11 is compromised, an attacker could potentially access your Ubuntu files or intercept your Ubuntu traffic. A full Ubuntu installation on a separate partition or disk is more isolated — an attacker would need to compromise Ubuntu itself, not Windows, to access your Linux environment.
However, a full Ubuntu installation means you lose access to Windows programs unless you set up dual boot, which adds complexity. Most people who want Ubuntu for learning or for specific Linux tools choose WSL2 because the convenience outweighs the isolation benefit. If you are concerned about Windows security specifically — for example, if you do not trust Windows Defender or you want to avoid Windows telemetry — a full installation makes more sense.
Neither path makes you automatically find. Ubuntu has its own vulnerabilities, and running sudo apt update and sudo apt upgrade regularly is just as important as keeping Windows patched. The real security benefit of Ubuntu is that it gives you more control over what runs on your system and makes it easier to see what programs are doing — but that control only helps if you actually use it.
Frequently Asked Questions
Can I run Ubuntu and Windows at the same time with WSL2?
Yes. WSL2 runs Ubuntu as a subsystem inside Windows, so both are active simultaneously. You can have Windows programs open in one window and Ubuntu terminal commands running in another. This is the main advantage of WSL2 over a full installation.
Will installing Ubuntu delete my Windows files?
Only if you choose "Erase disk and install Ubuntu" during installation. If you select "Something else" and create a new partition, your Windows files stay on the Windows partition. WSL2 does not touch your Windows files at all — it runs Ubuntu in a container.
Do I need to pay for Ubuntu?
No. Ubuntu is free and open-source. You can read it, install it, and use it without paying anything. Canonical, the company behind Ubuntu, makes money from support contracts and cloud services, not from the operating system itself.
What if I want to go back to Windows only after installing Ubuntu?
If you used WSL2, uninstall it by opening PowerShell as Administrator and typing wsl --uninstall. If you installed Ubuntu to a partition, you can delete the Ubuntu partition from Windows Disk Management and expand your Windows partition to reclaim the space. If Ubuntu is your only operating system, you will need a Windows 11 installation USB to reinstall Windows.
Is Ubuntu faster than Windows 11?
On the same hardware, Ubuntu typically uses less RAM and CPU than Windows 11, so it can feel faster on older machines. On newer machines with plenty of RAM, the difference is barely noticeable. Speed depends more on what programs you run than on the operating system itself.