Written by the

Linux: Getting Started

Master Linux foundations from scratch. Explore kernel architecture, Unix history, distributions, lab setup with VirtualBox and WSL2, terminal anatomy, and safe system control.

1.1 What Is Linux?

Linux is the dominant operating system powering modern cloud computing, containerized microservices, mobile phones, and supercomputers. To use Linux effectively as a system administrator or DevOps engineer, you must first understand what the name actually designates.

1.1.1 Kernel vs Operating System vs Distribution

The word 'Linux' is often used loosely, but technically three distinct layers exist:

  • The Linux Kernel:The low-level core engine created by Linus Torvalds. It manages CPU scheduling, RAM allocation, device drivers, and disk I/O. The kernel cannot be used directly by humans without user-space software.
  • The Operating System (GNU/Linux):The complete system created by combining the Linux kernel with essential user-space utilities (compilers, core utilities, shells, and system libraries) primarily developed by the GNU Project.
  • The Distribution (Distro):A ready-to-use software bundle packaged by an organization (like Canonical, Red Hat, or Debian). It includes the kernel, GNU tools, a package manager, default configuration files, and optionally a graphical desktop.

1.1.2 Short History: Unix, GNU, Linus Torvalds

Three historical milestones led to modern Linux:

  • 1969 (Unix at Bell Labs):Ken Thompson and Dennis Ritchie created Unix, establishing the concepts of hierarchical file trees, plain text data streams, and modular tools.
  • 1983 (The GNU Project):Richard Stallman launched GNU to build a completely free Unix-like system, creating GCC, Bash, and core utilities, but lacking a finished kernel.
  • 1991 (Linus Torvalds):A 21-year-old Finnish student announced a free hobby kernel for 386 computers. Pairing Linus's kernel with GNU user tools produced the first complete free operating system.

1.1.3 Where Linux Runs Today

Linux powers the infrastructure of modern computing:

  • Cloud & Web Servers:Over 80% of top web servers and public cloud virtual machines (AWS EC2, GCP, Azure) run Linux.
  • Android Mobile Devices:More than 3 billion active smartphones and tablets run directly on a modified Linux kernel.
  • Supercomputers & AI Clusters:100% of the world's 500 fastest supercomputers and AI training clusters (NVIDIA DGX systems) run Linux.
  • Embedded Devices & IoT:Home routers, smart TVs, automobile dashboards, and Raspberry Pi boards rely on lightweight Linux.

1.1.4 Open Source and Licensing (GPL)

How licensing protects the community from corporate enclosure:

  • GNU General Public License v2 (GPLv2):Linus Torvalds licensed the Linux kernel under GPLv2, guaranteeing anyone the freedom to view, modify, and run the code.
  • Copyleft Protection:If a company modifies the Linux kernel and distributes binaries, it must publish those source code modifications under the same license.
  • Free as in Speech:Open source refers to fundamental user liberty to study and modify software, rather than simply zero monetary price.

1.2 Choosing a Distribution

Hundreds of Linux distributions exist, but almost all production servers belong to two major family trees:

DistributionFamily TreePackage SystemRelease CadencePrimary Use Case
UbuntuDebianAPT / .debLTS (2 years) / Interim (6 mo)Standard for beginners, cloud, and DevOps
DebianIndependentAPT / .debFixed (approx 2 years)Rock-solid stability for production servers
Linux MintDebian / UbuntuAPT / .debTied to Ubuntu LTSFamiliar desktop experience for former Windows users
RHEL / Rocky / AlmaRed HatDNF / RPM10-year enterprise lifecycleEnterprise data centers, financial systems
FedoraRed HatDNF / RPMRapid (every 6 months)Upstream development, cutting-edge software
Arch LinuxIndependentPacmanRolling releaseAdvanced DIY enthusiasts and power users
Kali LinuxDebianAPTRollingPenetration testing and security auditing only

1.2.4 LTS vs Rolling Releases

Choosing the right release philosophy for your goal:

  • Long Term Support (LTS):Released on predictable schedules (Ubuntu releases LTS editions in April of even years, like 24.04). Receives security patches for 5 to 10 years without breaking software versions. Essential for servers.
  • Rolling Releases:Distributions like Arch update continuously. There are no major version numbers; packages update to the latest upstream version daily. Ideal for fast-moving desktop hardware, but risky for servers.

1.3 Setting Up Your Lab

To follow this hands-on course, you need an accessible Ubuntu 24.04 LTS environment. Four practical options are available:

1.3.1 Option A: Install Ubuntu 24.04 in VirtualBox

Safe, isolated virtual machine sandbox on Windows, macOS, or Linux:

  • Step 1: Download ISO:Download Ubuntu Desktop 24.04 LTS from ubuntu.com.
  • Step 2: Install VirtualBox:Download Oracle VirtualBox and the Extension Pack from virtualbox.org.
  • Step 3: Create VM:Allocate 4 GB RAM, 2 CPU cores, and a 30 GB dynamically expanding virtual hard disk.
  • Step 4: Boot and Install:Mount the ISO in the virtual optical drive, start the VM, and follow the setup wizard.

1.3.2 Option B: Install Linux with WSL2 on Windows

Fastest method for Windows 10/11 users with near-native performance:

  • Open PowerShell as Administrator:Run: wsl --install -d Ubuntu-24.04
  • System reboot:Restart your computer when prompted to finalize virtualization features.
  • Set credentials:Open Ubuntu from Start Menu, enter your chosen UNIX username and password.
  • Access files:Windows files are mounted at /mnt/c/; Linux files appear in Windows Explorer at \\wsl$\Ubuntu.

1.3.3 Option C: Dual Boot and Live USB Basics

Running directly on bare-metal hardware for maximum computing performance:

  • Live USB Testing:Flash an Ubuntu ISO to an 8 GB USB drive using Rufus or BalenaEtcher. Boot from USB to test Wi-Fi and hardware without writing to disk.
  • Dual Booting:Install alongside Windows on separate disk partitions. The GRUB bootloader lets you choose your OS at system startup.

1.3.4 Option D: Cloud VM Option (Free Tier)

Practice on real cloud infrastructure without local setup:

  • AWS / Oracle / GCP Free Tiers:Launch an Ubuntu 24.04 micro instance in the cloud.
  • Connect via SSH:Connect securely from any local terminal using your SSH key pair: ssh -i key.pem ubuntu@public-ip

1.4 Meet the Terminal

The command line is the primary workstation for Linux administrators. Understanding the distinction between its components eliminates confusion:

1.4.1 Terminal, Shell, and Console Explained

Three distinct layers of the command-line interface:

  • Console:The physical display monitor and keyboard directly attached to physical hardware (or virtual TTY text screens).
  • Terminal Emulator:The graphical desktop application window (such as GNOME Terminal or Windows Terminal) that renders text characters.
  • Shell:The background language interpreter (e.g., Bash) that reads text commands, evaluates syntax, and instructs the kernel to launch programs.

1.4.2 The Prompt and Command Anatomy

Dissecting the standard command line structure: command [options] [arguments]

  • The Prompt (user@host:~$):Shows username (alex), machine name (ubuntu), current directory (~ is home), and privilege tier ($ for normal user, # for root).
  • Command:The binary or built-in program to execute (e.g., ls).
  • Options (Flags):Modify behavior, written as short flags (-l, -a) or long flags (--all).
  • Arguments:The target object acted upon by the command (e.g., file paths or directory names).

1.4.3 Bash vs Zsh vs Sh

Comparing common command-line shells:

  • sh (Bourne Shell):The historic POSIX standard. Simple, fast, and universal across all Unix systems, but lacks interactive niceties.
  • Bash (Bourne Again Shell):The default on Ubuntu, Debian, and RHEL. Includes command history, tab completion, and script arrays.
  • Zsh (Z Shell):Default on macOS. Features theme engines (Oh My Zsh) and advanced auto-completion.

1.4.4 Shutting Down and Rebooting Safely

Never power off a Linux system by pulling the plug or forcing the power button:

  • Safe immediate shutdown:sudo shutdown now or sudo poweroff (syncs file caches to disk before halting power)
  • Safe immediate reboot:sudo reboot
  • Scheduled shutdown:sudo shutdown +15 "Server maintenance in 15 minutes"
  • Cancel scheduled shutdown:sudo shutdown -c

Knowledge Check: Module 1 Foundations

1. What is the core kernel of Linux?

2. Which license protects the Linux kernel from becoming closed source?

3. What does LTS stand for in Ubuntu releases?

4. Which tool runs Linux on Windows without dual booting?

5. Which default shell interpreter is most common across Linux distributions?

6. Which command shuts down a Linux system safely?

Next