How to Dual Boot Windows and Linux
Install Linux alongside Windows without losing your data. Step-by-step dual boot setup with GRUB.
Prerequisites
- A PC with Windows 10 or 11 installed
- A USB drive (8GB or larger)
- At least 50GB of free disk space
- A backup of important files
Back Up Your Data
Before touching partitions, back up anything important. Use an external drive, cloud storage, or both. Partitioning is generally safe but mistakes can happen.
Partitioning carries a small risk of data loss. Always back up first.
Shrink Your Windows Partition
Open Disk Management in Windows (right-click Start > Disk Management). Right-click your main partition (usually C:) and select Shrink Volume. Free up at least 50GB for Linux.
Download a Linux ISO and Create a Bootable USB
Download your preferred distro (Ubuntu, Mint, Fedora, etc.) and flash it to a USB drive using balenaEtcher or Rufus on Windows.
# On Linux, you can also use dd: sudo dd if=ubuntu-24.04.iso of=/dev/sdX bs=4M status=progress sync
Make sure you select the correct USB drive with dd — writing to the wrong device will erase it.
Boot from USB
Restart your PC and enter the boot menu (usually F12, F2, or Del during startup). Select your USB drive. If you have Secure Boot enabled and the installer doesn't load, you may need to disable it in BIOS.
Install Linux Alongside Windows
In the installer, choose Install alongside Windows (or "Something else" for manual partitioning). The installer will detect Windows and set up the partition automatically.
For manual partitioning, create:
- / (root) — at least 30GB, ext4
- swap — equal to your RAM (or skip with a swap file)
- /home — remaining space, ext4 (optional but recommended)
Configure GRUB Bootloader
After installation, GRUB will be your bootloader. On every startup, you'll see a menu to choose between Linux and Windows. If Windows doesn't appear in the menu, run:
sudo update-grub
Verify Both Systems Work
Reboot and test both operating systems from the GRUB menu. Make sure Windows still boots correctly and your files are intact. In Linux, you can access your Windows files by mounting the NTFS partition.
# See your partitions: lsblk # Mount Windows partition (usually already auto-mounted): sudo mount /dev/sda2 /mnt/windows