Navigation

Operating System Installation

Choose and install the best Linux distribution for deep learning. Compare Ubuntu, CentOS, and other options. Install drivers, configure dual-boot, and optimize OS for AI workloads.

Choosing Your Operating System

For deep learning workstations, you have three main options:

Best for: Most users, especially those new to deep learning

Pros:

  • Best NVIDIA driver support
  • Largest community for ML/DL
  • Most tutorials assume Ubuntu
  • Native Docker support
  • Package managers optimized for ML tools

Cons:

  • Learning curve if new to Linux
  • Some commercial software unavailable
  • Gaming performance worse than Windows

Recommended version: Ubuntu 22.04 LTS or 24.04 LTS

Windows 11

Best for: Users who need Windows software or prefer Windows workflow

Pros:

  • Familiar interface
  • Better for gaming/general use
  • WSL2 provides Linux compatibility
  • Easy NVIDIA driver installation

Cons:

  • WSL2 has performance overhead (5-15%)
  • Some ML tools Linux-only
  • More resource overhead
  • Updates can interrupt training

Best for: Dual-use systems (work + personal)

Dual Boot

Best for: Users who want both

Pros:

  • Native performance on both OSes
  • Use Windows for gaming, Ubuntu for training
  • No VM/WSL overhead

Cons:

  • More complex setup
  • Need to reboot to switch
  • Requires partitioning

Installation Guide

Ubuntu 22.04 LTS Installation

1. Download Ubuntu

Visit ubuntu.com/download and download:

  • Ubuntu 22.04.3 LTS (most stable)
  • Ubuntu 24.04 LTS (latest, if you want newer packages)

2. Create Bootable USB

On Windows:

# Download Rufus from rufus.ie
# Select your USB drive
# Select Ubuntu ISO
# Click Start

On Linux:

# Find your USB device
lsblk

# Write ISO to USB (replace sdX with your device)
sudo dd if=ubuntu-22.04.3-desktop-amd64.iso of=/dev/sdX bs=4M status=progress
sudo sync

3. Boot from USB

  1. Insert USB drive
  2. Restart computer
  3. Press Boot Menu key (usually F12, F11, or Esc)
  4. Select USB drive

4. Installation Process

Choose Installation Type:

โ—‹ Try Ubuntu (test without installing)
โ— Install Ubuntu (proceed with installation)

Keyboard Layout:

  • Select your keyboard layout
  • Test in the text box to verify

Updates and Other Software:

โ˜‘ Normal installation
โ˜‘ Download updates while installing Ubuntu
โ˜‘ Install third-party software for graphics and Wi-Fi hardware

Installation Type:

For ML-only system:

โ— Erase disk and install Ubuntu
  (Uses entire disk - simplest option)

For dual boot with Windows:

โ— Install Ubuntu alongside Windows
  (Follow partition wizard)

Manual partitioning (advanced users):

  • / (root): 50-100GB (ext4)
  • /home: Remaining space (ext4)
  • swap: 16-32GB (or equal to RAM)
  • Optional: Separate /data partition for datasets

5. Post-Installation

Update system:

sudo apt update
sudo apt upgrade -y

Install essential tools:

sudo apt install -y \
  build-essential \
  git \
  curl \
  wget \
  vim \
  tmux \
  htop \
  net-tools

Windows 11 Installation

1. Download Windows 11

2. Installation

  1. Boot from USB (press F12 during startup)
  2. Follow Windows installation wizard
  3. Choose โ€œCustom: Install Windows onlyโ€
  4. Select drive/partition
  5. Complete setup

3. Post-Installation

Windows Update:

Settings โ†’ Windows Update โ†’ Check for updates

Install WSL2 for Linux tools:

# Open PowerShell as Administrator
wsl --install -d Ubuntu-22.04

# Restart computer when prompted

Enable Virtualization in BIOS (if not already):

Optional: Install Windows Terminal:

# From Microsoft Store or:
winget install Microsoft.WindowsTerminal

Dual Boot Setup

Prerequisites

  • Existing Windows installation
  • At least 100GB free space
  • Backup of important data

1. Prepare Windows

Create free space:

  1. Open Disk Management (Win+X โ†’ Disk Management)
  2. Right-click C: drive
  3. Select โ€œShrink Volumeโ€
  4. Shrink by at least 100GB (recommend 200GB+)

Disable Fast Startup:

Control Panel โ†’ Power Options โ†’ Choose what power buttons do
โ†’ Uncheck "Turn on fast startup"

Disable Secure Boot:

2. Install Ubuntu

Follow Ubuntu installation steps, but:

At โ€œInstallation Typeโ€:

โ— Install Ubuntu alongside Windows Boot Manager

Or manually partition:

  • /boot/efi: 512MB (use existing EFI partition)
  • /: 50GB ext4
  • /home: Remaining space ext4
  • swap: 16-32GB

3. Boot Menu

GRUB will now show:

Ubuntu
Advanced options for Ubuntu
Windows Boot Manager

Change default:

# Edit GRUB config
sudo nano /etc/default/grub

# Change:
GRUB_DEFAULT=0  # 0=Ubuntu, 2=Windows (usually)
GRUB_TIMEOUT=5  # Seconds to show menu

# Update GRUB
sudo update-grub

Partitioning Recommendations

For ML Workloads

Minimum (Ubuntu):

  • /: 50GB
  • /home: 100GB+
  • swap: Equal to RAM

Recommended:

  • /: 100GB (OS and software)
  • /home: 200GB+ (configs, small datasets)
  • /data: Remaining (large datasets)
  • swap: 16-32GB

Why separate /data?

  • Easy to reinstall OS without losing datasets
  • Can use different filesystem (ext4 vs xfs)
  • Better organization

Storage Configuration

For single NVMe:

/dev/nvme0n1p1  512MB   EFI
/dev/nvme0n1p2  100GB   / (root)
/dev/nvme0n1p3  Remaining  /home

For multiple drives:

NVMe (fast):    OS and code
SATA SSD:       Datasets
HDD:            Archives and backups

Performance Optimizations

Ubuntu Tweaks

Install nvidia-prime for laptop GPUs:

sudo apt install nvidia-prime
sudo prime-select nvidia

Disable unnecessary services:

# Disable Bluetooth (if not needed)
sudo systemctl disable bluetooth

# Disable CUPS (printing)
sudo systemctl disable cups

Install minimal desktop (optional):

# For server-like setup with remote access
sudo apt install ubuntu-server
# Then SSH in from another machine

Windows Tweaks

Disable Windows Search indexing on data drives:

Right-click drive โ†’ Properties โ†’ Uncheck "Allow files on this drive to have contents indexed"

Set power plan:

Control Panel โ†’ Power Options โ†’ High Performance

Disable Game Bar:

Settings โ†’ Gaming โ†’ Game Bar โ†’ Off

Verification

Check Installation Success

# Check OS version
lsb_release -a

# Check kernel version
uname -r

# Check disk space
df -h

# Check memory
free -h

# List PCI devices (GPUs should appear)
lspci | grep -i nvidia
# Check OS version
winver

# Check system info
systeminfo

# Check disk space
Get-PSDrive

# Check WSL2 (if installed)
wsl --list --verbose

Common Issues

GPU Not Detected

Boot Order Issues

  • Access BIOS boot menu
  • Set proper boot priority

Dual Boot - Windows Missing

# Update GRUB
sudo update-grub

# Should detect Windows

Ubuntu Stuck at Login Loop

  • Usually a driver issue
  • Boot to recovery mode
  • Reinstall display drivers

Next Steps

After OS installation:

  1. Install NVIDIA drivers and CUDA
  2. Set up Python environment
  3. Configure remote access (see OS documentation)

:::tip[Take a snapshot] Once you have a clean OS install, consider:

  • Creating a system image (Timeshift on Ubuntu)
  • Documenting your partition layout
  • Backing up /etc/fstab if using custom mounts :::