DEV Community

Aryan Vaishnani
Aryan Vaishnani

Posted on

Installing Linux (VM & Bare Metal)

Linux can be installed in two main ways:

  1. Virtual Machine (VM) Installation
  2. Bare Metal Installation

Requirements for VM Installation

  1. ISO image of Linux distribution
  2. Virtualization software
  3. Minimum RAM and storage

Popular VM Software

  1. Oracle VM VirtualBox
  2. VMware Workstation
  3. Microsoft Hyper-V

Steps to Install Linux in VM

Step 1: Download Linux ISO

Download ISO from official website.

Examples:

  1. Ubuntu
  2. Debian
  3. Fedora

Step 2: Install Virtualization Software

Install:

  • VirtualBox
  • VMware
  • Hyper-V

Step 3: Create New Virtual Machine

Configure:

  1. VM name
  2. RAM allocation
  3. CPU cores
  4. Disk size
  5. ISO file selection

Example:

  • RAM: 4 GB
  • Disk: 25 GB

Step 4: Start VM

Boot VM using Linux ISO.

Linux installer screen will appear.

Step 5: Install Linux

Typical installation steps:

  1. Select language
  2. Select keyboard layout
  3. Configure disk partition
  4. Create username and password
  5. Install bootloader
  6. Start installation

Step 6: Reboot VM

After installation:

  1. Remove ISO
  2. Restart VM
  3. Login to Linux system

Advantages of VM Installation

  1. Safe testing environment
  2. No risk to host OS
  3. Easy snapshots and backups
  4. Multiple OS support
  5. Good for learning DevOps and Kubernetes

Disadvantages of VM Installation

  1. Lower performance than physical installation
  2. Shares hardware resources
  3. Limited graphics performance

Bare Metal Linux Installation

Bare metal means installing Linux directly on physical hardware.

Linux gets full access to:

  1. CPU
  2. RAM
  3. Storage
  4. Network devices

Requirements for Bare Metal Installation

  1. Linux ISO
  2. USB drive (8 GB or more)
  3. Bootable USB creation tool

Tools to Create Bootable USB

  1. Rufus
  2. balenaEtcher
  3. Ventoy

Steps for Bare Metal Installation

Step 1: Download Linux ISO

Download preferred Linux distribution ISO.

Step 2: Create Bootable USB

Use:

  • Rufus
  • Etcher
  • Ventoy

Select:

  1. ISO file
  2. USB drive
  3. Start flashing

Step 3: Boot from USB

  1. Insert USB
  2. Restart computer
  3. Open BIOS/UEFI boot menu
  4. Select USB device

Step 4: Start Linux Installer

Linux installer menu will appear.

Options:

  1. Try Linux
  2. Install Linux

Step 5: Configure Installation

Choose:

  1. Language
  2. Timezone
  3. Keyboard layout
  4. Disk partitioning
  5. Username/password

Partition Types

Partition Purpose
/ Root filesystem
/home User files
swap Virtual memory
/boot Boot files

Step 6: Install Bootloader

Usually:

  • GRUB bootloader is installed automatically.

GNU GRUB

Step 7: Complete Installation

  1. Installation copies files
  2. System reboots
  3. Remove USB drive
  4. Login to Linux

Advantages of Bare Metal Installation

  1. Full hardware performance
  2. Better speed
  3. Better GPU and disk performance
  4. Suitable for production systems

Disadvantages of Bare Metal Installation

  1. Risk of data loss if partitioned incorrectly
  2. Harder to test multiple systems
  3. Less flexible than VMs

VM vs Bare Metal

VM Installation Bare Metal Installation
Runs inside host OS Runs directly on hardware
Easier for learning Better performance
Safe testing Production-ready
Resource sharing Full hardware access
Easy snapshots More complex recovery

Real-World Usage

VM Usage

  1. Learning Linux
  2. DevOps practice
  3. Kubernetes labs
  4. Testing applications

Bare Metal Usage

  1. Production servers
  2. Gaming systems
  3. Database servers
  4. High-performance workloads

Top comments (0)