> ## Documentation Index
> Fetch the complete documentation index at: https://resources.devweekends.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Linux Crash Course

> Master the operating system that runs the world

<Frame>
  <img src="https://mintcdn.com/devweeekends/emzPt-9B_R8UKdqm/images/courses/devops-tools/linux-filesystem.svg?fit=max&auto=format&n=emzPt-9B_R8UKdqm&q=85&s=f88d255bc7c78c296d58948ebe9177b4" alt="Linux Filesystem Hierarchy" width="1080" height="1080" data-path="images/courses/devops-tools/linux-filesystem.svg" />
</Frame>

# Linux Crash Course

> **"Software is like sex: it is better when it is free."** - Linus Torvalds

Linux runs 96.3% of the world's top 1 million servers. All of the top 500 supercomputers. Every Android phone. Most of the internet. The Mars helicopter. If you want to work in tech, Linux is not optional. This course takes you from command-line-curious to shell-wielding confident.

***

## Why Linux Matters

Every major tech company runs on Linux. Here's why:

<CardGroup cols={2}>
  <Card title="Server Dominance" icon="server">
    96.3% of top web servers, 100% of supercomputers, all Android devices
  </Card>

  <Card title="Free & Open Source" icon="code">
    No licensing costs, complete control, massive community support
  </Card>

  <Card title="Cloud Native" icon="cloud">
    AWS, GCP, Azure - all built on Linux. Containers run on Linux.
  </Card>

  <Card title="DevOps Essential" icon="gears">
    CI/CD, Docker, Kubernetes - all require Linux knowledge
  </Card>
</CardGroup>

***

## The Story Behind Linux

**1991**: Linus Torvalds, a 21-year-old Finnish student, started writing a free Unix-like kernel as a hobby.

**The Announcement**:

> "I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu)"\
> — Linus Torvalds, August 25, 1991

**Today**: Linux runs:

* 96.3% of the world's top 1 million servers
* 100% of the world's top 500 supercomputers
* 3+ billion Android devices
* AWS, Google, Facebook, Netflix infrastructure
* SpaceX rockets and the Mars helicopter

***

## What You'll Learn

<Steps>
  <Step title="Fundamentals">
    File system navigation, essential commands, file operations. The commands you will type thousands of times.
    [Start Here](/courses/devops-tools/linux-fundamentals)
  </Step>

  <Step title="Internals Deep Dive">
    The kernel, system calls, virtual filesystem, process scheduling. If you love understanding how things actually work, this one is for you.
    [Explore Internals](/courses/devops-tools/linux-internals)
  </Step>

  <Step title="Permissions and Users">
    User management, file permissions, sudo, security fundamentals. Understanding who can do what.
    [Learn Permissions](/courses/devops-tools/linux-permissions)
  </Step>

  <Step title="Process Management">
    Understanding processes, systemd, services, job control. Keeping things running.
    [Manage Processes](/courses/devops-tools/linux-processes)
  </Step>

  <Step title="Networking">
    Network configuration, SSH, firewall rules, troubleshooting. Connecting to the world.
    [Master Networking](/courses/devops-tools/linux-networking)
  </Step>

  <Step title="Shell Scripting">
    Bash scripting, automation, cron jobs. Making the machine work for you.
    [Write Scripts](/courses/devops-tools/linux-scripting)
  </Step>

  <Step title="Security">
    Hardening, auditing, common vulnerabilities. Keeping the bad actors out.
    [Secure Systems](/courses/devops-tools/linux-security)
  </Step>

  <Step title="Monitoring">
    System metrics, log analysis, performance tuning. Knowing what is happening.
    [Monitor Everything](/courses/devops-tools/linux-monitoring)
  </Step>
</Steps>

***

## Linux Distributions

| Distribution    | Best For           | Package Manager |
| --------------- | ------------------ | --------------- |
| **Ubuntu**      | Beginners, servers | apt             |
| **Debian**      | Stability, servers | apt             |
| **RHEL/CentOS** | Enterprise         | yum/dnf         |
| **Fedora**      | Latest features    | dnf             |
| **Arch**        | Advanced users     | pacman          |
| **Alpine**      | Containers         | apk             |

**For this course**: Examples use Ubuntu/Debian, but concepts apply to all distributions.

***

## Linux vs Windows vs macOS

| Feature             | Linux          | Windows    | macOS                 |
| ------------------- | -------------- | ---------- | --------------------- |
| **Cost**            | Free           | \$139+     | Requires Mac hardware |
| **Servers**         | 96.3%          | 3.7%       | Less than 1%          |
| **Customization**   | Complete       | Limited    | Limited               |
| **Command Line**    | Bash/Zsh       | PowerShell | Zsh                   |
| **Package Manager** | apt/yum/pacman | winget     | brew                  |
| **Docker**          | Native         | WSL2       | VM                    |

***

## The Linux Philosophy

<AccordionGroup>
  <Accordion title="Everything is a File" icon="file">
    Devices, processes, network connections - all represented as files

    ```bash theme={null}
    ls /dev/  # Hardware devices
    ls /proc/ # Running processes
    ```
  </Accordion>

  <Accordion title="Small, Focused Tools" icon="wrench">
    Each program does one thing well, combine them with pipes

    ```bash theme={null}
    cat file.txt | grep "error" | wc -l
    ```
  </Accordion>

  <Accordion title="Text-Based Configuration" icon="file-lines">
    Configuration files are plain text, easy to edit and version control

    ```bash theme={null}
    vim /etc/nginx/nginx.conf
    ```
  </Accordion>

  <Accordion title="Scriptable" icon="terminal">
    Automate everything with shell scripts

    ```bash theme={null}
    #!/bin/bash
    for server in $(cat servers.txt); do
      ssh $server "uptime"
    done
    ```
  </Accordion>
</AccordionGroup>

***

## Real-World Use Cases

<CardGroup cols={2}>
  <Card title="Web Servers" icon="globe">
    Apache, Nginx running on Linux power most websites
  </Card>

  <Card title="Cloud Infrastructure" icon="cloud">
    EC2, GCE, Azure VMs - all Linux-based
  </Card>

  <Card title="Containers" icon="docker">
    Docker, Kubernetes run on Linux kernel features
  </Card>

  <Card title="DevOps Automation" icon="robot">
    CI/CD pipelines, infrastructure as code, monitoring
  </Card>
</CardGroup>

***

## Prerequisites

<Info>
  **What You Need**:

  * A Linux system (Ubuntu recommended)
  * Or WSL2 on Windows
  * Or a virtual machine (VirtualBox, VMware)
  * Or a cloud instance (AWS EC2, DigitalOcean)

  **Installation Options**:

  * **WSL2 (Windows)**: `wsl --install -d Ubuntu`
  * **VirtualBox**: Download Ubuntu ISO, create VM
  * **Cloud**: Launch Ubuntu instance on AWS/GCP/Azure
  * **Dual Boot**: Install alongside Windows (advanced)
</Info>

***

## Course Structure

This crash course takes you from zero to productive in 10-12 hours.

### Module 1: Fundamentals (2-3 hours)

File system hierarchy, navigation commands, file operations, viewing and finding files. The muscle memory you will build here lasts a lifetime. Every other module depends on being comfortable in the terminal.

### Module 2: Internals Deep Dive (2-3 hours)

User space vs kernel space, system calls, the virtual filesystem, process scheduling, the CFS scheduler. This is where Linux stops being a black box and starts being a machine you understand. **If you love knowing how things actually work, dive in. If you just want to get things done, skip to Module 3 -- no judgment.**

### Module 3: Permissions and Users (2 hours)

User and group management, the rwx permission model, SUID/SGID/sticky bit, sudo mechanics. Getting permissions right is the difference between a secure server and an open door. Getting them wrong is how you lock yourself out at 2 AM.

### Module 4: Process Management (2 hours)

The ps command, htop, signals and killing processes, background jobs, systemd service management. You will learn to write custom systemd unit files so your applications start on boot, restart on crash, and log properly.

### Module 5: Networking (2-3 hours)

Network interfaces, IP configuration, SSH mastery (keys, config, tunnels), firewall basics with UFW and iptables, DNS troubleshooting. This module gives you the vocabulary and tools to debug "it cannot connect" problems in minutes instead of hours.

### Module 6: Shell Scripting (2-3 hours)

Bash syntax, variables and loops, conditionals, functions, cron jobs. By the end, you will have written a realistic deployment script and automated a backup job. The `set -euo pipefail` pattern alone will save you from dozens of bugs.

### Module 7: Security (1-2 hours)

SSH hardening, firewall configuration, Fail2Ban, automatic updates, file permission auditing. This module covers the baseline that every production server should have before running any workloads.

### Module 8: Monitoring (1-2 hours)

htop, vmstat, iostat, journalctl, log rotation. You will learn a systematic performance investigation workflow -- load, CPU/IO split, process identification, deep dive -- instead of guessing.

***

## Essential Commands Preview

```bash theme={null}
# Navigation
cd /var/log        # Change directory
ls -lah            # List files with details
pwd                # Print working directory

# File operations
cp file.txt backup.txt    # Copy
mv old.txt new.txt        # Move/rename
rm file.txt               # Remove
mkdir mydir               # Make directory

# Viewing files
cat file.txt       # Display entire file
less file.txt      # Page through file
head -n 10 file.txt # First 10 lines
tail -f log.txt    # Follow file updates

# System info
uname -a           # System information
df -h              # Disk usage
free -h            # Memory usage
uptime             # System uptime

# Process management
ps aux             # List all processes
top                # Real-time process monitor
kill PID           # Terminate process

# Networking
ip addr            # Show IP addresses
ping google.com    # Test connectivity
ssh user@server    # Remote login
```

***

## Why Developers Love Linux

<Tabs>
  <Tab title="Performance">
    * Lightweight, fast boot times
    * Efficient resource usage
    * No bloatware or background processes
    * Direct hardware access
  </Tab>

  <Tab title="Development">
    * Native Docker and containers
    * Powerful package managers
    * Built-in development tools
    * Same environment as production
  </Tab>

  <Tab title="Customization">
    * Choose your desktop environment
    * Customize everything
    * Automate with scripts
    * Complete control over system
  </Tab>

  <Tab title="Community">
    * Massive open-source ecosystem
    * Excellent documentation
    * Active forums and support
    * Free forever
  </Tab>
</Tabs>

***

## Learning Path

<Steps>
  <Step title="Week 1: Basics">
    Install Linux, learn navigation, practice daily commands
  </Step>

  <Step title="Week 2: Administration">
    User management, permissions, process control
  </Step>

  <Step title="Week 3: Networking">
    SSH, network configuration, troubleshooting
  </Step>

  <Step title="Week 4: Automation">
    Shell scripting, cron jobs, system automation
  </Step>
</Steps>

***

## Success Metrics

By the end of this crash course, you will be able to:

* Navigate the Linux file system without thinking
* Manage files, directories, and permissions with confidence
* Monitor and control processes like a sysadmin
* Configure networking and SSH into remote servers
* Write shell scripts that automate tedious tasks
* Troubleshoot common Linux issues without Googling every step
* Work productively in a terminal environment (and maybe even prefer it)

***

## Fun Facts

* **Penguin Mascot**: Tux the penguin became Linux's mascot in 1996
* **Naming**: "Linux" = Linus + Unix
* **First Version**: Linux 0.01 had only 10,239 lines of code
* **Today**: Linux kernel has 30+ million lines of code
* **Contributors**: 20,000+ developers from 1,700+ companies
* **Mars**: Linux runs on the Mars Perseverance rover

***

Ready to master Linux? Start with [Linux Fundamentals](/courses/devops-tools/linux-fundamentals) or dive straight into [Internals Deep Dive](/courses/devops-tools/linux-internals) if you want to understand what is actually happening when you run a command.
