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
- Work through each module in order.
- Run every command yourself in a terminal.
- Complete the exercises before moving on.
- Check your answers with the verification steps.
- If a command feels risky, use
--helpfirst 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
- Print your current working directory, then navigate to
/var/logand list all files. - Find all files modified in the last 24 hours under
/etc. - Search for the word
PasswordAuthenticationinside/etc/ssh/sshd_config. - Use
lessto read/var/log/syslog, then search for the worderrorinsidelessusing/error. - Create a directory
~/lab1and inside it create three files. List them using a wildcard.
Verification
pwdalways shows where you are.grepreturns 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
- Print kernel version, distro name, and uptime.
- Find which process listens on TCP port 22.
- Check status of
cronandssh. - Restart the
cronservice and verify it is active again. - Find the top 5 processes by memory usage.
- Show the last 30 lines of journal output for the
sshservice.
Verification
ss -tulnpshowssshdon port 22.systemctl status cronshows active (running).journalctlshows 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
- Update package lists without installing anything.
- Search for a text editor package (for example
nanoorvim) and show its description. - Install
htopif it is not already installed. - List all packages containing the word
dockerin their name. - Remove a package you do not need, then run
autoremove. - Mark an important package as held, then verify it is held.
Verification
apt list --installed | grep htopshows htop.- Package count drops after removal + autoremove.
apt-mark showholdshows 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
- List all block devices with filesystem types.
- Show filesystem usage sorted by mount point.
- Find the filesystem type and UUID of your root partition.
- Show detailed ext4 filesystem info for your root partition.
- Confirm swap size and type.
Verification
lsblk -fshows device, label, and filesystem.df -hshows usage percentages.tune2fsshows 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
- Show current IP addresses and interface state.
- Print the default route.
- Resolve
google.comwithdig. - Check which services are listening on all interfaces.
- Show verbose UFW firewall status if UFW is installed.
- Trace the route to
1.1.1.1usingmtr(ortracerouteifmtris missing).
Verification
ip ashows expected local IP.digreturns answer section.ss -tulnpshows 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
- Show your current user ID, groups, and home shell.
- Check whether
PermitRootLoginis enabled or disabled insshd_config. - Verify whether
PasswordAuthenticationis enabled. - Find failed login attempts in
/var/log/auth.log. - Run
needrestartin non-interactive/report mode if available. - Check whether automatic security updates are enabled.
Verification
PermitRootLoginshould usually beno.PasswordAuthenticationshould usually benoif keys are deployed.auth.logcontains 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
- Write a script that reports disk usage and saves it to
~/disk-report.txt. - Run
shellcheckon the script and fix warnings. - Schedule the script with
cronor a systemd timer. - Add error handling so the script exits on failure.
- 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
- Identify the 3 slowest boot units.
- Show all error-level journal messages from the current boot.
- Run
ncdu /varand identify the largest directories. - Show CPU and IO snapshot for 5 seconds using
vmstat. - 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
tmuxandgitif those are still rough edges