Software & OS

How to Dual Boot Linux and Windows 11 (Ubuntu, Step by Step)

To dual boot Linux and Windows, you shrink the Windows partition to free some space, then boot a Linux installer from USB and choose the option to install alongside Windows, which adds a boot menu where you pick the system at each start. Before that, back up your files and save your BitLocker recovery key, because changing partitions and boot settings on an encrypted Windows drive can trigger BitLocker recovery.

This guide uses Ubuntu 24.04 LTS on a Windows 11 PC with UEFI firmware, the combination Ubuntu's own tutorial covers. Other distributions follow the same order with different installer screens. It describes the process; read it through before you start, because the preparation steps matter more than the install itself.

Is dual boot what you need?

Dual boot means only one system runs at a time, and you reboot to switch. If you only want Linux tools on a Windows machine, WSL or a virtual machine (see VirtualBox vs VMware) gives you that without touching partitions. Dual boot makes sense when Linux needs the hardware directly: GPU drivers, full disk speed, or all of the RAM.

Step 1: check firmware mode and partitions (read-only)

In PowerShell, this prints the firmware type:

$env:firmware_type

It should print UEFI. Microsoft's Windows 11 requirements list UEFI, Secure Boot capable firmware, so a PC that runs Windows 11 normally shows UEFI here. Then look at the disk layout:

Get-Partition | Select-Object DiskNumber, PartitionNumber, Type, Size

Example output (sizes rounded to GB):

DiskNumber PartitionNumber Type     SizeGB
---------- --------------- ----     ------
         0               1 System      0.3
         0               2 Reserved      0
         0               3 Basic     931.2

The System partition is the EFI System Partition, where both Windows Boot Manager and the Linux bootloader will live. Basic is your C: drive. If you have a second, empty drive, installing Linux there is simpler, because nothing on the Windows disk needs to shrink.

Step 2: back up, and save the BitLocker recovery key

Ubuntu's tutorial says it is "always recommended to back up your data prior to installation". Do it.

Next, check BitLocker. Open Settings and search for Manage BitLocker, or go to Control Panel > System and Security > BitLocker Drive Encryption. Some PCs ship with it turned on, even if you never enabled it yourself (see BitLocker vs FileVault for how it works). This matters for two reasons:

  • Microsoft's BitLocker recovery overview lists "Changes to the NTFS partition table on the disk" and "Changes to the boot manager" among the events that can make Windows ask for the 48-digit recovery password at startup. Dual booting does both.
  • Ubuntu's tutorial says that with BitLocker enabled, the installer can't read the drive's contents, so it can't safely install alongside Windows.

Before anything else, get the recovery key. Microsoft's support page says it is usually in your Microsoft account at https://aka.ms/myrecoverykey, or at https://aka.ms/aadrecoverykey for a work or school account. Write it down somewhere off the PC. Microsoft states that its support "doesn't have the ability to retrieve, provide, or recreate a lost BitLocker recovery key."

Ubuntu's tutorial then gives the choice: turn BitLocker off and wait for decryption to finish, or don't install alongside Windows. It also notes that "Not all versions of Windows will allow you to re-enable BitLocker after disabling it," and that some PCs ship with BitLocker enabled but the drive not yet encrypted, in which case it suggests turning BitLocker on and then off. On a work-managed PC, ask IT first: turning off encryption may break company policy.

Step 3: shrink the Windows partition

Do this from Windows, not from the Linux installer. Open Disk Management (right-click Start, or run diskmgmt.msc), right-click the C: volume and select Shrink Volume. Enter the amount to free in MB; for 100 GB, that is 102400 MB.

Microsoft's documentation explains the common surprise: files such as the paging file and the shadow copy storage area can't be moved, so the volume can only shrink down to where they sit. If the offered size is too small, the application log has an event with ID 259 naming the file in the way. The result should be an Unallocated block next to C:. Leave it unallocated; the Linux installer will use it.

Ubuntu's tutorial gives 25 GB as the minimum storage for Ubuntu. Leave Windows enough free space for updates as well.

Step 4: turn off fast startup

Windows' fast startup makes "Shut down" only a partial shutdown. Microsoft's driver documentation describes it: Windows closes applications and signs out users, then "saves the kernel memory image (including the loaded kernel-mode drivers) in Hiberfil.sys and shuts down the computer." The Windows partition is therefore left in a hibernated state rather than cleanly closed, which is a problem if Linux later writes to it.

Turn it off by unticking Turn on fast startup in the Power Options settings for the power buttons, or by running powercfg.exe /hibernate off in an administrator Command Prompt. Microsoft documents that command as making hibernation unavailable, and its support article notes that without Hiberfil.sys "the computer cannot hibernate". Fast startup loads that same file, so it stops too. powercfg.exe /hibernate on brings both back.

Step 5: create the USB installer and boot it

Download the Ubuntu Desktop ISO from ubuntu.com. Ubuntu's tutorial uses balenaEtcher to write it to a USB stick of 12 GB or more; writing erases the stick. Restart with the stick plugged in. If the PC boots straight back into Windows, hold the boot menu key during startup: the tutorial names F12, and lists Escape, F2 and F10 as common alternatives. Choose the USB device.

Secure Boot can stay on. Ubuntu's security documentation explains that Microsoft signs Ubuntu's shim, which trusts Canonical's key and validates GRUB and the kernel. If you tick the option to install third-party drivers (for example, Nvidia), you may be asked for a password and then, at the first reboot, to enroll a Machine Owner Key in the MokManager screen. Enter the same password there.

Step 6: install alongside Windows

In the installer, choose Install Ubuntu alongside Windows when it is offered. The tutorial describes a drive selector and a slider for how much space Ubuntu gets, limited so it doesn't overwrite existing files. Check the drive carefully if you have more than one; the tutorial warns, "Take care to ensure that you are selecting the right drive in this instance!" Do not pick Erase disk and install Ubuntu: on the selected drive, that removes Windows.

If "alongside" isn't offered, stop. It usually means the installer can't read the Windows partition (BitLocker still on) or there is no free space. Manual partitioning is for people who know exactly which partition is which.

Step 7: choose a system at boot

After the install, the PC should start into Ubuntu's GRUB menu, which lists both Ubuntu and Windows Boot Manager. If it boots straight into Windows instead, open the firmware's boot order settings and move "ubuntu" above "Windows Boot Manager". If Windows asks for the BitLocker recovery key on its next start, enter the key you saved in Step 2; this is the scenario Microsoft's recovery overview describes.

If the clock is wrong after switching systems

If the time is off by your time-zone offset every time you switch, the two systems disagree about whether the hardware clock (RTC) holds UTC or local time. Linux can be told to use local time with timedatectl set-local-rtc 1, but the timedatectl manual warns that this "is not fully supported" and "will create various problems with time zone changes and daylight saving adjustments", and recommends keeping the RTC in UTC "if at all possible".

Frequently asked questions

Do I need to disable Secure Boot to dual boot Ubuntu?
No. Ubuntu's security documentation explains that Microsoft signs Ubuntu's shim bootloader, which then checks GRUB and the kernel signed by Canonical, so official Ubuntu kernels boot with Secure Boot on. You only meet Secure Boot prompts for third-party kernel modules, such as some graphics drivers, which the installer handles by asking you to enroll a Machine Owner Key on the next boot.
How much space should I give Linux?
Ubuntu's tutorial lists at least 25 GB of storage as the minimum. That is enough to install and try it; if you plan to keep files, development tools or games on the Linux side, plan for considerably more. Leave Windows enough free space for its own updates too.
Is dual booting safe for my Windows install?
It is safe when you prepare for it: back up your files, save the BitLocker recovery key, shrink the Windows partition from Windows itself, and choose the installer's 'alongside' option rather than 'erase disk'. Most problems come from skipping one of those steps, especially the BitLocker one.
Should I dual boot or use WSL or a virtual machine?
If you mainly need Linux command-line tools, WSL or a virtual machine avoids repartitioning entirely and runs next to Windows. Dual boot gives Linux the whole machine, including direct access to the GPU and full disk speed, at the cost of rebooting to switch.

Sources