How to Install Linux on a PC with Windows and Run Both Operating Systems
Dual-booting Windows and Linux allows you to enjoy the best of both worlds: the familiarity of Windows and the flexibility of Linux. This guide will walk you through the step-by-step process of installing Linux on a PC that already has Windows installed.
Prerequisites
Before proceeding with the installation, ensure you have the following:
- A PC with Windows installed.
- A USB drive (at least 8GB) for creating a bootable Linux installer.
- A backup of important files in case anything goes wrong.
- A stable internet connection to download the Linux distribution.
Step 1: Choose a Linux Distribution
There are many Linux distributions (distros) available. Some popular choices include:
- Ubuntu – Beginner-friendly and widely used.
- Linux Mint – Great for users transitioning from Windows.
- Fedora – Ideal for developers and professionals.
- Debian – Stable and reliable for long-term use.
Download the ISO file of your chosen Linux distro from its official website.
Step 2: Create a Bootable USB Drive
- Download and install Rufus (Windows) or Balena Etcher (cross-platform).
- Insert the USB drive and launch Rufus.
- Select your downloaded Linux ISO file.
- Set the partition scheme to GPT if your system uses UEFI or MBR for legacy BIOS.
- Click Start to create a bootable USB.
Step 3: Create Space for Linux
To install Linux alongside Windows, you need unallocated space:
- Press Win + X and open Disk Management.
- Right-click on the Windows partition and select Shrink Volume.
- Allocate at least 20GB (or more) for Linux.
Step 4: Boot from the USB Drive
- Restart your PC and enter the BIOS/UEFI (press F2, F12, DEL, or ESC depending on your PC manufacturer).
- Change the boot order to prioritize the USB drive.
- Save and exit BIOS, then restart.
Step 5: Install Linux
- Once the USB boots, select Try Linux to test it before installation.
- If everything works fine, click Install Linux.
- Choose Install alongside Windows (recommended for beginners) or Something else for manual partitioning.
- Allocate space for:
- Root (/) Partition – 20GB or more (ext4 format).
- Swap Partition – Equal to or double your RAM size.
- Home Partition (Optional) – For personal files (recommended if you want to keep your data separate from the system files).
- Set your username and password.
- Click Install Now and wait for the installation to complete.
Step 6: Configure Dual Boot with GRUB
After installation, your system should boot into GRUB, the Linux bootloader, allowing you to choose between Windows and Linux. If Windows is missing from the GRUB menu:
- Boot into Linux and open the terminal.
- Run:
sudo update-grub
- Restart your computer.
Step 7: Post-Installation Setup
- Update Linux: Open the terminal and run:
sudo apt update && sudo apt upgrade -y
- Install essential drivers and software.
- Customize the desktop environment to your liking.