Linux Essentials

This syllabus starts with a 2-hour core (four 30-minute modules) and then extends into a full-day 12-hour Linux admin track. It balances fundamental concepts, hands-on practice, and essential networking/security skills like SSH.


🐧 Linux Essentials: 2-Hour Crash Course

⏱️ Course Overview


πŸ› οΈ Module 1: Shell Navigation & The Help System (30 Mins)

Introduction to the CLI (5 mins)

Basic Navigation (15 mins)

Self-Help & Documentation (10 mins)


πŸ“‚ Module 2: File Manipulations & Text Processing (30 Mins)

Creating and Moving Files (15 mins)

Inspecting and Searching Text (15 mins)


🌐 Module 3: Remote Access (SSH), File Transfer & Networking (30 Mins)

Introduction to SSH (10 mins)

Copying Files Remotely (10 mins)

Basic Networking Utilities (10 mins)


πŸ”’ Module 4: Permissions, System Control & Troubleshooting (30 Mins)

Linux Permissions & Sudo (10 mins)

Process Management (10 mins)

System Diagnostics (10 mins)


🏁 Hands-on Lab Challenge (To run during the final 15 mins)

Perform this exact sequence on your test environments to validate your understanding:

  1. Log into your remote training server using SSH.
  2. Create a folder named backup_test in your home directory.
  3. Generate a system status file: df -h > disk_space.txt.
  4. Use grep to find the word β€œroot” inside disk_space.txt.
  5. Change the file permissions so it is read-only for everyone (chmod 444 disk_space.txt).
  6. Disconnect from SSH and try to use scp to pull that disk_space.txt file back to your local machine.

πŸš€ Hour 3: Users, Packages, Services, and Logs

Module 5 (2:00 - 2:30): User and Group Administration

Module 6 (2:30 - 3:00): Package and Service Management

Hour 3 Mini-Drill (5-10 mins)

  1. Install htop.
  2. Check SSH service status with systemctl.
  3. Enable SSH service to start on boot.
  4. Verify with systemctl is-enabled <service>.

πŸ”§ Hour 4: Automation, Scheduling, and Recovery Basics

Module 7 (3:00 - 3:30): Shell Scripting Fundamentals

Module 8 (3:30 - 4:00): Scheduling and Troubleshooting Workflow


🏁 Hands-on Lab Challenge 2 (End of Hour 4)

Complete this sequence to validate your Hour 3 and 4 skills:

  1. Create a user named opsuser and add it to sudo (Ubuntu) or wheel (AlmaLinux).
  2. Install htop and verify it launches.
  3. Write a script named health_check.sh that outputs date, uptime, disk usage, and memory usage.
  4. Make the script executable and run it, saving output to health_report.txt.
  5. Create a cron job that runs the script every day at 06:00 and appends to health.log.
  6. Confirm the cron entry exists with crontab -l.
  7. Check recent SSH service logs using journalctl for your distro.
  8. Document one troubleshooting finding from logs in a file named incident_notes.txt.

πŸ’Ώ Bonus: Installing Ubuntu Server 26.04 and AlmaLinux

Use this section if you want to build your own lab VMs (VirtualBox, VMware, Proxmox, Hyper-V, or cloud instances).

Before You Start

Install Ubuntu Server 26.04 LTS (Quick Path)

  1. Boot from the Ubuntu Server 26.04 ISO.
  2. Select language, keyboard layout, and network settings.
  3. Set hostname (for example: ubuntu-lab).
  4. Create your admin user and strong password.
  5. For storage, choose guided partitioning unless you need a custom layout.
  6. Enable OpenSSH Server during setup so remote access works immediately.
  7. Complete install, reboot, and remove ISO media.
  8. Verify after first login:
    • cat /etc/os-release
    • ip a
    • sudo systemctl status ssh

Install AlmaLinux (Quick Path)

  1. Boot from the AlmaLinux ISO.
  2. In the installer, configure:
    • Keyboard and timezone.
    • Installation destination (auto-partitioning is fine for labs).
    • Network and hostname (for example: alma-lab).
  3. In software selection, choose a minimal/server profile.
  4. Set root password and create a regular admin user.
  5. Start installation, then reboot when finished.
  6. Verify after first login:
    • cat /etc/os-release
    • ip a
    • sudo systemctl status sshd

First Updates (Both Distros)

Bonus: SSH Keys on Windows (What They Are + How to Manage Them)

sequenceDiagram
   participant C as Windows client
   participant K as Private key
   participant S as SSH server
   participant A as authorized_keys

   C->>K: Sign challenge locally
   C->>S: Send public-key auth request
   S->>A: Compare presented key
   A-->>S: Match found
   S-->>C: Login allowed

Where Keys Live on Windows

Generate a New Key Pair (PowerShell)

  1. Open PowerShell.
  2. Run:
    • ssh-keygen -t ed25519 -C "your_email@example.com"
  3. When prompted:
    • Save path: press Enter for default, or set a custom filename.
    • Passphrase: set one (recommended).
  4. Verify files:
    • Get-ChildItem $HOME\.ssh

Start ssh-agent and Load Your Private Key

  1. Ensure the agent service is running:
    • Get-Service ssh-agent | Set-Service -StartupType Automatic
    • Start-Service ssh-agent
  2. Add your key:
    • ssh-add $HOME\.ssh\id_ed25519
  3. Confirm key is loaded:
    • ssh-add -l

Publish Your Public Key Safely

Validate and Troubleshoot

Alternative SSH Tools on Windows

If you do not want to use the built-in OpenSSH client, these are common alternatives.

1. PuTTY + PuTTYgen + Pageant (Classic and Widely Used)

2. Convert Existing OpenSSH Keys for PuTTY

If you already created id_ed25519 with ssh-keygen, convert it for PuTTY:

  1. Open PuTTYgen.
  2. Click Load and select your OpenSSH private key (id_ed25519).
  3. Save private key as .ppk.
  4. Use this .ppk in PuTTY Auth settings.

Note: your public key stays the same conceptually; keep publishing only the public key content.

3. MobaXterm (All-in-One SSH + SFTP GUI)

4. Bitvise SSH Client (Good GUI Controls)

Tool Choice Quick Guide


🧭 Extended Track: Hours 5-12 (Full-Day Linux Admin Foundations)

If you want to continue beyond the first 4 hours, use this expanded path to build practical, job-ready Linux administration skills.

Hour 5 (4:00 - 5:00): Storage and Filesystems

Module 9 (4:00 - 4:20): Disk Discovery and Partitioning

Module 10 (4:20 - 4:40): Filesystems and Mounting

Module 11 (4:40 - 5:00): LVM in Production (Why, Safe Usage, and Real Examples)

graph TD
   D[Physical disk] --> P[Partition marked for LVM]
   P --> PV[PV: pvcreate]
   PV --> VG[VG: vgcreate or vgextend]
   VG --> LV[LV: lvcreate or lvextend]
   LV --> FS[Filesystem: ext4 or xfs]
   FS --> M[Mount point: /data]
   D2[Additional disk] --> PV
  1. Pre-change checks:
    • Confirm backups/snapshots exist and are restorable.
    • Record current state: lsblk, pvs, vgs, lvs, df -h.
    • Confirm application I/O profile and low-traffic change window.
  2. Add new physical disk and verify detection:
    • lsblk
  3. Partition disk for LVM (example with /dev/sdb):
    • sudo parted -s /dev/sdb mklabel gpt mkpart primary 1MiB 100% set 1 lvm on
  4. Build/extend LVM stack:
    • sudo pvcreate /dev/sdb1
    • New VG path: sudo vgcreate vg_data /dev/sdb1
    • Existing VG path: sudo vgextend vg_data /dev/sdb1
  5. Create logical volume (example):
    • sudo lvcreate -n lv_app -L 100G vg_data
  6. Create filesystem and mount:
    • sudo mkfs.xfs /dev/vg_data/lv_app
    • sudo mkdir -p /data
    • sudo mount /dev/vg_data/lv_app /data
    • sudo blkid /dev/vg_data/lv_app
    • Add UUID=<uuid> /data xfs defaults,nofail 0 2 to /etc/fstab
    • sudo mount -a

Example: Grow an Existing LV with Minimal Downtime

Downtime and Risk Reduction Checklist for Disk Work

Hour 5 Lab Test

  1. Add a new virtual disk and confirm identification with lsblk and fdisk -l.
  2. Partition it as LVM and create a PV.
  3. Create or extend vg_data, then create lv_app.
  4. Format lv_app (xfs or ext4), mount at /data, and persist with UUID in /etc/fstab.
  5. Simulate growth by extending the LV and filesystem online.
  6. Validate with pvs, vgs, lvs, and df -h /data.
  7. Write a short rollback and safety checklist in storage_change_notes.txt.

Hour 6 (5:00 - 6:00): Networking and Firewall Operations

Module 12 (5:00 - 5:20): Interfaces and Routing

Module 13 (5:20 - 5:40): DNS and Connectivity Troubleshooting

Module 14 (5:40 - 6:00): Firewall Workflows

graph TD
   C[Container port] --> D[Docker publish -p]
   D --> H[Host port]
   H --> L[Bind to 127.0.0.1 for local only]
   H --> W[Bind to 0.0.0.0 for public access]
   H --> R[Reverse proxy entrypoint]
   R --> F[UFW or firewalld]
   F --> I[External client]

Hour 6 Lab Test

  1. Allow only SSH and HTTP through the firewall.
  2. Confirm listener and firewall rules.
  3. Validate remote access still works.
  4. Document one failed test and how you corrected it.

Hour 7 (6:00 - 7:00): Monitoring and Log Analysis

Module 15 (6:00 - 6:20): Logs and Journald

Module 16 (6:20 - 6:40): Performance Monitoring

Module 17 (6:40 - 7:00): Alerting Mindset and Baselines

graph LR
   H[Linux host] --> NE[Node Exporter]
   NE --> P[Prometheus]
   P --> G[Grafana dashboards]
   P --> A[Alertmanager]
   A --> N[Email / Slack / Teams]
   H --> L[Promtail or Fluent Bit]
   L --> LK[Loki]
   LK --> G

Hour 7 Lab Test

  1. Simulate high CPU or memory load.
  2. Identify impact using monitoring commands.
  3. Confirm Node Exporter metrics are reachable on port 9100.
  4. Add the host to Prometheus and verify target health is up.
  5. Build/import a Grafana dashboard and verify live host metrics.
  6. Create one alert rule (for example: high CPU) and test notification routing.
  7. Correlate symptoms with logs.
  8. Produce a short incident summary with findings.

Hour 8 (7:00 - 8:00): Service Management and Boot Troubleshooting

Module 18 (7:00 - 7:20): systemd Deep Dive

Module 19 (7:20 - 7:40): Startup Control

Module 20 (7:40 - 8:00): Recovery Basics

Hour 8 Lab Test

  1. Intentionally misconfigure a non-critical test service.
  2. Detect failure cause via systemctl and journalctl.
  3. Correct and restart service.
  4. Confirm successful boot persistence.

Hour 9 (8:00 - 9:00): Bash Scripting and Automation

Module 21 (8:00 - 8:20): Script Structure

Module 22 (8:20 - 8:40): Control Flow and Safety

Module 23 (8:40 - 9:00): Scheduling Automation

Hour 9 Lab Test

  1. Build a script that checks disk, memory, and SSH service.
  2. Write output to dated files in a reports/ directory.
  3. Schedule it daily and verify execution.

Hour 10 (9:00 - 10:00): Security Hardening Essentials

Module 24 (9:00 - 9:20): SSH Hardening

Module 25 (9:20 - 9:40): Least Privilege and sudo Hygiene

Module 26 (9:40 - 10:00): Patching and Vulnerability Hygiene

Hour 10 Lab Test

  1. Enforce SSH key auth in a lab environment.
  2. Verify root SSH login is blocked.
  3. Confirm SSH hardening settings with sshd -T output checks.
  4. Audit users with sudo or wheel membership and remove one unnecessary privilege.
  5. Run patch workflow for your distro and capture package changes.
  6. Configure Fail2ban for SSH and one web service jail, then verify jail status.
  7. Validate services and document post-patch checks in security_change_notes.txt.

Hour 11 (10:00 - 11:00): Backup and Restore Operations

Module 27 (10:00 - 10:20): Backup Strategy Basics

Module 28 (10:20 - 10:40): Backup Tooling

Module 29 (10:40 - 11:00): Restore Validation

graph LR
   S[Live system] --> B[Backup job: rsync or tar]
   B --> R[Backup repository]
   R --> T[Restore test]
   T --> V[Validate files, permissions, and service]

Hour 11 Lab Test

  1. Define RPO/RTO targets for a sample service in 2-3 sentences.
  2. Back up /etc and one app data directory using both rsync and tar.
  3. Create an exclusion list and re-run backup.
  4. Simulate accidental deletion of test data.
  5. Restore from backup to a test path, then to the live path.
  6. Validate permissions, service health, and sample application data.
  7. Document backup frequency, retention, and restore results in backup_restore_notes.txt.

Hour 12 (11:00 - 12:00): Containers and DevOps Intro (Optional)

Module 30 (11:00 - 11:20): Container Fundamentals

Module 31 (11:20 - 11:40): Running Containerized Services

Module 32 (11:40 - 12:00): Operational Patterns

Hour 12 Lab Test

  1. Pull and run a web container with a named volume.
  2. Map host port and verify with curl -I http://localhost:<port>.
  3. Restart container and verify persisted content still exists.
  4. Capture and interpret logs for one normal event and one error event.
  5. Run a second container with environment variables and inspect effective config.
  6. Write a short compose.yaml or equivalent manifest for repeatable deployment.

πŸ“˜ Additional Standalone Sections

Common Failure Playbooks

Command Cheat Sheets by Theme

Ubuntu vs AlmaLinux Quick Reference

Pre-Change and Post-Change Checklists


πŸ§ͺ Final Capstone (2-3 Hours)

Build and operate a complete Linux server workflow from scratch:

  1. Provision Ubuntu or AlmaLinux VM and harden SSH.
  2. Create admin and non-admin users with proper group membership.
  3. Configure firewall rules for SSH and a web service.
  4. Deploy and enable a simple service at boot.
  5. Add monitoring script + scheduled execution.
  6. Set up backup job for config and app data.
  7. Simulate one outage scenario and recover service.
  8. Produce a final operations report with commands used, findings, and lessons learned.