dotlinux guide

A Step-by-Step Guide to Installing Linux on Your PC

Linux, an open-source operating system (OS), has grown in popularity due to its flexibility, security, and cost-effectiveness. Unlike proprietary systems like Windows or macOS, Linux offers full control over your hardware and software, with thousands of free applications and a vibrant community for support. Whether you’re a developer, student, or casual user, installing Linux can breathe new life into an old PC, enhance privacy, or provide a lightweight alternative to resource-heavy OSes. This guide will walk you through installing Linux from start to finish, covering prerequisites, distribution selection, bootable media creation, installation steps, post-setup, and troubleshooting. By the end, you’ll have a functional Linux system tailored to your needs.

Table of Contents

  1. Prerequisites
  2. Choosing a Linux Distribution
  3. Creating a Bootable USB Drive
  4. Preparing Your PC for Installation
  5. Booting from the USB Drive
  6. Step-by-Step Installation Process
  7. Post-Installation Setup
  8. Common Issues and Solutions
  9. Best Practices
  10. Conclusion
  11. References

Prerequisites

Before starting, ensure you have the following:

RequirementDetails
PC HardwareA PC with at least: 2GB RAM (4GB+ recommended), 20GB free storage (SSD preferred), 64-bit CPU (most modern PCs). Check if your PC supports 64-bit here.
BackupImportant data (documents, photos, etc.) backed up to an external drive or cloud storage.
USB DriveA USB flash drive (8GB+ capacity) to create a bootable installer.
Internet ConnectionFor downloading the Linux ISO and post-install updates.
Optional ToolsA tool to create bootable USBs (e.g., Rufus, BalenaEtcher) and a tool to check hardware compatibility (e.g., live USB testing).

Choosing a Linux Distribution

Linux “distributions” (distros) are pre-packaged OSes with the Linux kernel, desktop environment, and software. Choose one based on your experience level and needs:

DistroBest ForKey Features
UbuntuBeginners, general useUser-friendly, large community, LTS (Long-Term Support) versions.
FedoraDevelopers, cutting-edge softwareUses latest technologies, sponsored by Red Hat, focuses on open-source.
Linux MintWindows users transitioning to LinuxFamiliar interface (Cinnamon desktop), pre-installed media codecs.
DebianStability-focused users, serversRock-solid stability, large package repository, base for Ubuntu/Mint.
Arch LinuxAdvanced users, customizationRolling release (always up-to-date), minimal base, build-your-own OS.

For beginners, Ubuntu or Linux Mint are ideal. We’ll use Ubuntu 22.04 LTS (Long-Term Support) as our example, as it’s widely supported and beginner-friendly.

Creating a Bootable USB Drive

To install Linux, you’ll need a bootable USB drive with the Linux ISO file. Here’s how to create one:

Step 1: Download the Linux ISO

  1. Go to the Ubuntu download page.
  2. Select “Ubuntu 22.04 LTS” (LTS for stability) and click “Download.” Save the ISO file (e.g., ubuntu-22.04.3-desktop-amd64.iso).

Step 2: Create the Bootable USB

Use one of these tools based on your current OS:

Option 1: BalenaEtcher (Cross-Platform: Windows/macOS/Linux)

BalenaEtcher is the easiest tool for beginners:

  1. Download BalenaEtcher.
  2. Open Etcher, click “Flash from file,” and select the downloaded ISO.
  3. Insert your USB drive, then click “Select target” and choose your USB.
  4. Click “Flash!” and wait for the process to complete (10–15 minutes).

Option 2: Rufus (Windows Only)

Rufus is lightweight and fast for Windows users:

  1. Download Rufus.
  2. Insert your USB drive.
  3. Open Rufus, select your USB under “Device.”
  4. Click “Select” and choose the Linux ISO.
  5. Leave other settings default (Partition scheme: GPT for UEFI, MBR for Legacy BIOS).
  6. Click “Start” and confirm overwriting the USB.

Option 3: dd Command (Linux/macOS)

Advanced users can use the dd terminal command (Caution: Incorrect use will erase data!):

  1. Insert your USB drive and identify its device name (e.g., /dev/sdb on Linux or /dev/disk2 on macOS). Use lsblk (Linux) or diskutil list (macOS) to check.
  2. Unmount the USB (if auto-mounted):
    # Linux: Replace /dev/sdb with your USB device  
    sudo umount /dev/sdb*  
    
    # macOS: Replace disk2 with your USB device  
    diskutil unmountDisk /dev/disk2  
  3. Write the ISO to the USB (replace path/to/iso and device):
    # Linux/macOS: Use sudo and double-check the device name!  
    sudo dd if=path/to/ubuntu-22.04.3-desktop-amd64.iso of=/dev/sdb bs=4M status=progress  

Preparing Your PC for Installation

Before booting from the USB, configure your PC’s firmware (BIOS/UEFI) and free up disk space.

Step 1: Free Up Disk Space

  • Windows Users: Open “Disk Management” (search in Start Menu), shrink an existing partition to create unallocated space (right-click partition → “Shrink Volume”). Aim for at least 20GB.
  • Linux/macOS Users: Use tools like GParted (Linux) or Disk Utility (macOS) to resize partitions.

Step 2: Configure BIOS/UEFI Settings

Modern PCs use UEFI (Unified Extensible Firmware Interface), while older ones use Legacy BIOS. Access settings by restarting your PC and pressing a key during boot (varies by manufacturer):

ManufacturerBIOS/UEFI KeyBoot Menu Key (to select USB)
DellF2F12
HPF10F9
LenovoF2/Fn+F2F12
ASUSDelF8

In BIOS/UEFI:

  • Disable Secure Boot (UEFI only): Prevents unsigned OSes from booting. Look for “Secure Boot” → “Disabled.”
  • Enable Legacy Support (if needed for older distros).
  • Set Boot Order: Prioritize USB drives (or use the boot menu key to select the USB directly).

Booting from the USB Drive

  1. Insert the bootable USB into your PC.
  2. Restart your PC and press the boot menu key (e.g., F12 for Dell) to open the boot device menu.
  3. Select your USB drive (labeled “USB,” “Removable,” or the drive brand).

You’ll now boot into the Linux live environment—a temporary session where you can test Linux before installing.

Step-by-Step Installation Process

Once in the live environment, follow these steps to install Linux:

Step 1: Launch the Installer

On Ubuntu, click “Install Ubuntu” on the desktop. Select your language and click “Continue.”

Step 2: Choose Keyboard Layout

Select your keyboard layout (e.g., “English (US)”) and click “Continue.”

Step 3: Updates and Software

  • Check “Normal installation” (includes web browser, office suite, media players).
  • Check “Install third-party software for graphics and Wi-Fi hardware, MP3, and other media” (recommended for codecs and proprietary drivers).
  • Click “Continue.”

Step 4: Installation Type

Choose how to install Linux:

OptionUse Case
Erase disk and install UbuntuWipes the entire disk (use only if replacing Windows/macOS).
Install Ubuntu alongside WindowsDual-boot: Keep Windows and Linux (requires free space).
Something elseManual partitioning (advanced users: create custom partitions).

Dual-Boot Example (Install Alongside Windows)

  1. Select “Install Ubuntu alongside Windows Boot Manager.”
  2. Drag the divider in the disk visualization to allocate space to Linux (e.g., 30GB).
  3. Click “Continue.”

Manual Partitioning (Advanced)

For control over partitions (e.g., separate /home for user data), select “Something else”:

  1. Select the unallocated space and click “+.”
  2. Create these partitions:
    • Root Partition: Size: 20–30GB, Mount point: /, File system: ext4.
    • Swap Partition: Size: 1–2x RAM (e.g., 4GB for 4GB RAM), File system: swap.
    • Home Partition: Size: Remaining space, Mount point: /home, File system: ext4.
  3. Ensure “Device for boot loader installation” is set to your main disk (e.g., /dev/sda).
  4. Click “Install Now” and confirm partition changes.

Step 5: Set Timezone

Select your timezone (e.g., “New York”) on the map and click “Continue.”

Step 6: Create User Account

  • Your name: Display name (e.g., “John Doe”).
  • Computer name: Hostname (e.g., “john-pc”).
  • Username: Login name (e.g., “john”).
  • Password: Strong password (mix of letters, numbers, symbols).
  • Check “Log in automatically” (optional, for convenience) or “Require my password to log in.”
  • Click “Continue” to start the installation (10–20 minutes).

Step 7: Complete Installation

Once installed, click “Restart Now.” Remove the USB drive when prompted, then press Enter. Your PC will reboot into Linux!

Post-Installation Setup

After booting into Linux, perform these critical tasks:

Step 1: Update the System

Open a terminal (Ctrl+Alt+T) and run:

sudo apt update && sudo apt upgrade -y  

This updates all installed software to the latest versions.

Step 2: Install Drivers

  • Graphics Drivers: For NVIDIA GPUs, open “Software & Updates” → “Additional Drivers” → select the proprietary driver → “Apply Changes.”
  • Wi-Fi/Bluetooth: If Wi-Fi isn’t working, install drivers via “Additional Drivers” or use Ethernet temporarily to download them.

Step 3: Install Essential Software

Use the terminal or “Ubuntu Software” store to install apps:

# Web browser (Chrome/Firefox pre-installed; install Edge if needed)  
sudo apt install microsoft-edge-stable  

# Office suite (LibreOffice pre-installed; install OnlyOffice for collaboration)  
sudo apt install onlyoffice-desktopeditors  

# Media player (VLC)  
sudo apt install vlc  

Step 4: Secure Your System

Enable the firewall to block unauthorized access:

sudo ufw enable  # Turns on firewall  
sudo ufw status  # Verifies firewall is active  

Step 5: Customize the Desktop

  • Change wallpaper, themes, or icons via “Settings” → “Appearance.”
  • Install a different desktop environment (e.g., GNOME, KDE, XFCE) for a new look:
    # Install KDE Plasma  
    sudo apt install kubuntu-desktop  

Common Issues and Solutions

IssueSolution
GRUB Bootloader Not ShowingUse Boot Repair: Boot from live USB, install via sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt install boot-repair, then run “Recommended repair.”
Wi-Fi Not WorkingInstall proprietary drivers via “Additional Drivers” or download drivers from the manufacturer’s website (e.g., Realtek).
Black Screen After InstallationBoot into recovery mode (select “Advanced options” in GRUB), update drivers, or disable Secure Boot.
Insufficient Disk SpaceUse gparted to resize partitions (boot from live USB, launch GParted, resize unallocated space into Linux partitions).

Best Practices

  1. Test with Live USB First: Verify hardware compatibility (Wi-Fi, sound, graphics) before installing.
  2. Backup Data: Always back up files to an external drive or cloud storage.
  3. Use LTS Versions: For stability, choose Long-Term Support distros (e.g., Ubuntu 22.04 LTS, supported until 2027).
  4. Separate /home Partition: Makes upgrading/reinstalling Linux easier (preserves user data).
  5. Encrypt Sensitive Data: During installation, check “Encrypt the new Ubuntu installation for security” to protect data.
  6. Avoid Using sudo for Daily Tasks: Use a standard user account; only use sudo for administrative actions.

Conclusion

Installing Linux is a rewarding process that unlocks a world of open-source software and customization. By following this guide, you’ve learned to choose a distro, create a bootable USB, configure your PC, and install Linux—whether as a dual-boot or standalone OS.

Linux’s strength lies in its community, so don’t hesitate to seek help on forums like Ask Ubuntu or Linux Mint Forums. Experiment with different distros and tools to tailor your system to your needs!

References