Getting Started with Linux: Installation and the Basics of Virtualization
Learn how to set up Linux using virtual machines, WSL, or dual boot while understanding the basics of virtualization and hypervisors.
Introduction
In our first article (click here to read), we explored the basics of Linux, including its history, features, and importance in fields like development, cloud computing, and DevOps. Now, it’s time to take the next step: setting up your first Linux environment. But before diving straight into installation, it’s crucial to understand a foundational technology that powers much of modern computing — virtualization.
This article will guide you through:
- The basics of virtualization and hypervisors.
- Step-by-step instructions for installing Linux using various methods, including virtual machines, WSL, and dual boot.
- Best practices and tips to optimize your setup.
What is Virtualization?
Virtualization is creating virtual instances of computing resources, such as operating systems, storage, and networks, on physical hardware. It enables multiple operating systems to run simultaneously on the same machine, offering flexibility and efficiency.
Benefits of Virtualization
- Cost Savings: Maximizes hardware utilization by running multiple virtual machines (VMs) on a single server.
- Flexibility: Quickly create, modify, or remove environments.
- Isolation: Ensures that changes in one VM don’t affect others.
Understanding Hypervisors
A hypervisor is the software layer that enables virtualization. It abstracts physical hardware and allocates resources to virtual machines.
Types of Hypervisors
- Type 1 (Bare Metal): Runs directly on hardware without an underlying OS.
- Type 2 (Hosted): This type runs on top of an existing OS and is ideal for personal or testing purposes.
- Examples: VMware ESXi, Microsoft Hyper-V, Xen.
- Use Case: Enterprise environments.
Mermaid Diagram: The Hypervisor Ecosystem

Setting Up Linux: Installation Methods
1. Using a Virtual Machine
Virtual machines are one of the easiest ways to experiment with Linux without changing your existing system.
Steps to Set Up Linux on VirtualBox
- Download VirtualBox:
Download VirtualBox. - Download a Linux Distribution:
Choose a lightweight beginner-friendly distro like Ubuntu or Fedora (Ubuntu ISO Download). - Create a Virtual Machine:
- Open VirtualBox and click New.
- Set a name (e.g., “Ubuntu VM”) and select the Linux OS type.
- Allocate resources: RAM: 4GB (minimum) and Disk Space: 20GB (dynamic allocation recommended).
- Attach the downloaded ISO file to the VM.
4. Install Linux:
- Start the VM and follow the Linux installation wizard.
- Create a user account and set a password.
Tips:
- Enable VT-x or AMD-V in your BIOS for better performance.
- Take snapshots of your VM before testing risky changes.
2. Using WSL (Windows Subsystem for Linux)
WSL is a great option for Windows users who want a lightweight Linux environment.
Steps to Set Up WSL
- Enable WSL on Windows:
wsl --install
2. Choose a Distribution:
Install a distro from the Microsoft Store, such as Ubuntu.
3. Launch and Configure:
- Open WSL from the Start Menu.
- Update packages:
sudo apt update && sudo apt upgrade
3. Dual Booting Linux
Dual booting allows you to run Linux alongside your existing OS.
Steps to Dual Boot
- Create a Bootable USB:
Use tools like Rufus (Download Rufus) to flash a Linux ISO onto a USB drive. - Partition Your Disk:
- Shrink an existing partition to create free space for Linux.
- Use a partitioning tool like Disk Management on Windows.
3. Install Linux:
- Boot from the USB drive.
- Select Install alongside the existing OS during the installation wizard.
Mermaid Diagram: Dual Boot Setup

4. Dedicated Installation:
This method involves wiping your machine clean and installing Linux as the sole operating system. It’s ideal for full-time Linux users.
Optimizing Your Linux Environment
Essential Commands for Beginners
After installation, familiarize yourself with basic Linux commands:
- Navigating Directories:
ls # List files
cd dir # Change directory
pwd # Show current directory
2. Managing Files:
touch file.txt # Create a file
mkdir new_dir # Create a directory
rm file.txt # Remove a file
3. Updating the System:
sudo apt update && sudo apt upgrade
Don’t worry, we will be going through each command in detail in the upcoming articles.
Relevant Documentation and Resources
- Linux Documentation Project
- Ubuntu Official Documentation
- VirtualBox User Manual
- Microsoft WSL Documentation
Practical Challenge
- Challenge 1: Install Linux using any of the methods covered.
- Challenge 2: Run the following commands and explore their output:
uname -a
df -h
free -m
- Share your experience and any challenges you faced!
3. Practical Use Case: Setting Up a Development Environment
- Install Git:
sudo apt install git
2. Set up a code editor:
sudo snap install --classic code
3. Clone and manage a repository:
git clone <repo_url>
cd <repo_name>
What’s Next?
In the next article, we’ll dive into Linux File System, Permissions, and Basic Commands, covering how to navigate, manage files, and secure your Linux system.