README

Linux Zero to Hero

A comprehensive, self-paced Linux course focused on Ubuntu 24 LTS and Debian 12.

Target audience: Computer users familiar with Windows or macOS who want to become confident Linux power users.

What you will learn: Terminal proficiency, filesystem mastery, shell scripting, package management, networking fundamentals, system troubleshooting, security basics, and how to build a complete power-user environment.


How to Use This Course

  1. Set up a practice environment — Lesson 00.03 walks you through installing Linux in a virtual machine. All labs assume you have a working Ubuntu 24 LTS or Debian 12 system.
  2. Follow the modules in order — Each lesson builds on previous ones. Prerequisite concepts are explained inline when needed.
  3. Do the labs — Reading theory is not enough. Every lesson has hands-on exercises. Type the commands yourself.
  4. Answer the review questions — They test both understanding and practical skill. Answers are in collapsible sections.

Lesson Format

Every lesson follows the same structure:

[Read more]

AppArmor

AppArmor

Prerequisite — Mandatory Access Control (MAC): Standard Linux permissions (rwx, owner/group) are Discretionary Access Control (DAC) — the file owner decides who can access it. Mandatory Access Control adds a system-wide layer on top: the administrator defines what each program is allowed to do, regardless of the user running it. Even if a program runs as root, MAC can restrict it to only its expected files and operations. AppArmor is Linux’s MAC system on Ubuntu and Debian.

[Read more]

APT and dpkg

APT and dpkg

Concepts

What Is a Package?

A package is a bundle containing:

  • The program’s files (binaries, libraries, configuration files, documentation)
  • Metadata (name, version, description, author)
  • Dependencies — other packages this one requires to work

On Debian/Ubuntu, packages use the .deb format. The system that manages these packages has two layers:

Layer Tool Role
Low-level dpkg Installs, removes, and queries individual .deb files. Does NOT handle dependencies.
High-level apt Resolves dependencies, downloads packages from repositories, and calls dpkg underneath.

In practice, you use apt for almost everything. dpkg is for special cases.

[Read more]

Automatic Updates and Auditing

Automatic Updates and Auditing

Concepts

Why Automatic Updates?

Security patches are released frequently. If you don’t apply them promptly, your system is vulnerable to known exploits. Unattended upgrades automatically install security updates so you don’t have to remember.

unattended-upgrades

Both Ubuntu and Debian support automatic security updates via the unattended-upgrades package.

Install and Enable

# Install (pre-installed on Ubuntu, may need installing on Debian)
sudo apt install -y unattended-upgrades

# Enable
sudo dpkg-reconfigure -plow unattended-upgrades
# Select "Yes" to enable automatic updates

Configuration

# Main config
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Key settings:

[Read more]

Block Devices and Partitions

Block Devices and Partitions

Concepts

Block Devices

A block device is a storage device that reads and writes data in fixed-size blocks. Hard drives, SSDs, USB drives, and virtual disks are all block devices. They appear as files in /dev/:

Device Meaning
/dev/sda First SCSI/SATA disk
/dev/sdb Second disk
/dev/sda1 First partition on first disk
/dev/sda2 Second partition
/dev/nvme0n1 First NVMe SSD
/dev/nvme0n1p1 First partition on NVMe
/dev/vda Virtual disk (KVM/QEMU)

Viewing Block Devices

# Best overview — tree format
lsblk
# NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
# sda      8:0    0    40G  0 disk
# ├─sda1   8:1    0   512M  0 part /boot/efi
# ├─sda2   8:2    0  38.5G  0 part /
# └─sda3   8:3    0     1G  0 part [SWAP]

# With filesystem info
lsblk -f

# Detailed partition info
sudo fdisk -l /dev/sda

# Block device details
sudo blkid

Partition Tables: MBR vs GPT

A partition table defines how a disk is divided into partitions.

[Read more]