Overview

This mini-course is designed to get you back into daily Linux admin shape quickly. It is practical, exercise-driven, and focused on Debian-based systems.

Estimated time: 4–6 hours total
Difficulty: Beginner → Intermediate
Prerequisites: Access to a Debian/Ubuntu/Mint system with sudo


How to use this guide

  1. Work through each module in order.
  2. Run every command yourself in a terminal.
  3. Complete the exercises before moving on.
  4. Check your answers with the verification steps.
  5. If a command feels risky, use --help first or test in a VM.

Module 1 — Shell Fundamentals & Navigation

Learning objectives

  • Move around the filesystem confidently
  • View and search file contents
  • Use tab completion, wildcards, and quoting correctly

Core concepts

  • Absolute vs relative paths
  • Shell expansion and quoting
  • Streams: stdin, stdout, stderr
  • Exit codes

Command reference

pwd
cd
ls -la
tree
stat
file
cat
less
head
tail
grep -Rin
find
locate
which
type

Hands-on exercises

  1. Print your current working directory, then navigate to /var/log and list all files.
  2. Find all files modified in the last 24 hours under /etc.
  3. Search for the word PasswordAuthentication inside /etc/ssh/sshd_config.
  4. Use less to read /var/log/syslog, then search for the word error inside less using /error.
  5. Create a directory ~/lab1 and inside it create three files. List them using a wildcard.

Verification

  • pwd always shows where you are.
  • grep returns the matching line and filename.
  • Wildcard expansion works without quoting.

Module 2 — System Management & Processes

Learning objectives

  • Inspect system state
  • Manage services with systemd
  • Inspect and control processes

Core concepts

  • PID, PPID, and user context
  • systemd units: services, timers, sockets
  • Foreground vs background jobs
  • Signals: SIGTERM, SIGKILL, SIGHUP

Command reference

uname -a
cat /etc/os-release
hostnamectl
uptime
timedatectl
ps aux
top
htop
pgrep -af
kill
kill -9
lsof
ss -tulnp
systemctl status
systemctl restart
systemctl enable
systemctl disable
journalctl -u
systemd-analyze blame

Hands-on exercises

  1. Print kernel version, distro name, and uptime.
  2. Find which process listens on TCP port 22.
  3. Check status of cron and ssh.
  4. Restart the cron service and verify it is active again.
  5. Find the top 5 processes by memory usage.
  6. Show the last 30 lines of journal output for the ssh service.

Verification

  • ss -tulnp shows sshd on port 22.
  • systemctl status cron shows active (running).
  • journalctl shows recent reload/restart events.

Module 3 — Package Management & Software

Learning objectives

  • Install, update, and remove packages cleanly
  • Audit installed software
  • Keep the system healthy

Core concepts

  • APT repositories and sources list
  • Package states: installed, held, orphaned
  • Pinning and version selection
  • Cleanup after upgrades

Command reference

sudo apt update
sudo apt upgrade -y
sudo apt install -y
sudo apt remove -y
sudo apt autoremove -y
dpkg -l
apt list --installed
apt-cache search
apt-cache show
deborphan
apt-mark hold
apt-mark unhold
needrestart

Hands-on exercises

  1. Update package lists without installing anything.
  2. Search for a text editor package (for example nano or vim) and show its description.
  3. Install htop if it is not already installed.
  4. List all packages containing the word docker in their name.
  5. Remove a package you do not need, then run autoremove.
  6. Mark an important package as held, then verify it is held.

Verification

  • apt list --installed | grep htop shows htop.
  • Package count drops after removal + autoremove.
  • apt-mark showhold shows the held package.

Module 4 — Storage & Filesystems

Learning objectives

  • Inspect disks and partitions
  • Mount and unmount filesystems safely
  • Use LVM and RAID basics when needed

Core concepts

  • Block devices, partitions, filesystems
  • Mount points and /etc/fstab
  • Filesystem checks and repair
  • Swap and tmpfs

Command reference

lsblk -f
blkid
df -h
mount
findmnt
tune2fs -l
fsck
cat /proc/mdstat
lvdisplay
vgdisplay
pvdisplay
swapon --show
free -h

Hands-on exercises

  1. List all block devices with filesystem types.
  2. Show filesystem usage sorted by mount point.
  3. Find the filesystem type and UUID of your root partition.
  4. Show detailed ext4 filesystem info for your root partition.
  5. Confirm swap size and type.

Verification

  • lsblk -f shows device, label, and filesystem.
  • df -h shows usage percentages.
  • tune2fs shows block count, created date, and mount count.

Module 5 — Networking Essentials

Learning objectives

  • Inspect interfaces and routes
  • Test connectivity and DNS
  • Read firewall rules

Core concepts

  • IP addressing, netmask, gateway
  • DNS resolution order
  • TCP and UDP ports
  • Firewalls: allow vs deny, input vs output

Command reference

ip a
ip route
resolvectl status
hostname
ping
traceroute
mtr
dig
curl -I
ss -tulnp
tcpdump
iptables -L -n -v
nft list ruleset
ufw status verbose

Hands-on exercises

  1. Show current IP addresses and interface state.
  2. Print the default route.
  3. Resolve google.com with dig.
  4. Check which services are listening on all interfaces.
  5. Show verbose UFW firewall status if UFW is installed.
  6. Trace the route to 1.1.1.1 using mtr (or traceroute if mtr is missing).

Verification

  • ip a shows expected local IP.
  • dig returns answer section.
  • ss -tulnp shows expected listener ports.

Module 6 — Security & Hardening

Learning objectives

  • Harden SSH access
  • Review authentication and logging
  • Apply basic server hygiene

Core concepts

  • Authentication: keys, passwords, 2FA
  • Principle of least privilege
  • Log review as a routine habit
  • Automatic updates vs controlled change windows

Command reference

id
getent passwd
passwd
usermod -aG
chsh
sudo
su -
sudo -l
sudo cat /etc/sudoers
sudo cat /etc/ssh/sshd_config
journalctl -p err -b
sudo dmesg | tail
sudo needrestart -r

Hands-on exercises

  1. Show your current user ID, groups, and home shell.
  2. Check whether PermitRootLogin is enabled or disabled in sshd_config.
  3. Verify whether PasswordAuthentication is enabled.
  4. Find failed login attempts in /var/log/auth.log.
  5. Run needrestart in non-interactive/report mode if available.
  6. Check whether automatic security updates are enabled.

Verification

  • PermitRootLogin should usually be no.
  • PasswordAuthentication should usually be no if keys are deployed.
  • auth.log contains timestamped login attempts.

Module 7 — Automation & Scripting

Learning objectives

  • Write safe, reusable shell snippets
  • Use scheduling tools
  • Handle errors and logging

Core concepts

  • Shebang, set -euo pipefail
  • Exit codes and $?
  • Input validation
  • Logging to file and syslog
  • systemd timers vs cron

Command reference

chmod +x
bash -n
shellcheck
crontab -l
crontab -e
systemctl list-timers
at now
logger

Hands-on exercises

  1. Write a script that reports disk usage and saves it to ~/disk-report.txt.
  2. Run shellcheck on the script and fix warnings.
  3. Schedule the script with cron or a systemd timer.
  4. Add error handling so the script exits on failure.
  5. Send a test message to syslog with logger.

Verification

  • Shellcheck returns no warnings.
  • Cron or timer file exists and is readable.
  • Log file/email shows expected output after the job runs.

Module 8 — Monitoring & Troubleshooting

Learning objectives

  • Diagnose common failures quickly
  • Use logs to find root causes
  • Check hardware and temperature when relevant

Core concepts

  • Layered troubleshooting: hardware → kernel → services → app
  • Log priority levels
  • Reproducing and isolating issues
  • Knowing when to reboot vs fix live

Command reference

systemd-analyze blame
systemd-analyze critical-chain
journalctl -p err -b
journalctl -b
sudo dmesg | tail
sudo dmesg | grep -i error
ncdu
iotop
sudo iostat -xz 1 5
vmstat 1 5
sar

Hands-on exercises

  1. Identify the 3 slowest boot units.
  2. Show all error-level journal messages from the current boot.
  3. Run ncdu /var and identify the largest directories.
  4. Show CPU and IO snapshot for 5 seconds using vmstat.
  5. Check for hardware or driver errors in dmesg.

Verification

  • Boot analysis clearly names the slow units.
  • No unexpected kernel errors appear.
  • Disk and memory snapshots show where usage is concentrated.

Capstone Checklist

Use this as a final review:

  • I can navigate the filesystem comfortably without thinking
  • I can inspect and restart services without Googling
  • I can install, remove, and audit packages cleanly
  • I can inspect disks, partitions, and mount points
  • I can troubleshoot network issues in 2–3 commands
  • I can harden SSH and review auth logs
  • I can write and schedule a simple maintenance script
  • I can diagnose slow boots and find major errors quickly

Next steps

  • Add your own notes for your specific setup (Mint quirks, home lab hardware, etc.)
  • Build small repeatable scripts for tasks you do often
  • Consider learning tmux and git if those are still rough edges