How to explain to students
Start by asking: "When you visit Netflix, GitHub, or Google — what OS do you think is running those servers?" The answer is almost always Linux. Explain that over 96% of web servers run Linux. DevOps is about automating those servers, so Linux is non-negotiable.
Use the analogy: "Windows is like an automatic car. Linux is a manual — harder to learn, but gives you full control over every gear."
How to explain to students
Compare the terminal to a GPS for your computer. pwd is "where am I?", ls is "what's around me?", and cd is "go there". Give students a real folder structure to navigate.
Live demo: Create a fake project structure on screen and let students replicate it. Nothing teaches mkdir and cp faster than actually using them.
How to explain permissions
Use the apartment analogy: A file is an apartment. The owner has a key. The group is like the floor — neighbors with shared access. Others are strangers. Permissions (rwx) decide what each can do.
Teach chmod with the numeric system. It clicks instantly once students see 7 = 4+2+1 = read+write+execute.
sudo or docker.sudo = one command as root. su = switch user entirely. Prefer sudo.How to explain to students
Compare apt to the App Store — but for the terminal, and way faster. Ask students: "Imagine installing Photoshop just by typing one command." That's what package managers do.
Emphasize that in DevOps, servers must be kept updated for security. Outdated packages are a top cause of breaches. apt upgrade is like pressing "Update All" on your phone.
How to explain to students
Tell students: "Every time you do something more than twice in the terminal, write a script." Scripts are just saved commands. Start with a simple "Hello, World" script, then build up to variables, if-else, and loops.
The shebang line #!/bin/bash is magic — explain it tells the OS which interpreter to use. Without it, the script might not run.
"$VAR" not $VAR to avoid word-splitting bugs with spaces.set -x at the top to print each command as it runs — great for debugging.set -e to stop the script immediately if any command fails.How to explain to students
Teach students that AI is a force multiplier, not a replacement. The goal is to know enough Linux to verify and modify what AI generates. Bad prompt = bad script. Good prompt = great starting point.
Show a before/after: a vague prompt gives a generic script, a detailed prompt gives a production-ready one. Teach students to always read, test, and understand AI output before running it on a server.
How to explain to students
This is where everything comes together. Walk through the script line by line before asking students to build it. Emphasize: this is the kind of script that runs on real production servers at companies like Amazon and Netflix.
crontab -e and schedule this script every 5 minutes automatically.logrotate — logs need to be rotated or they fill the disk you're monitoring!Sample quiz questions (interactive)
chmod 644 file.txt mean?set -e do in a bash script?Fill-in-the-command
script.sh executable by the owner only?How to explain to students
Frame this as a real job task: "Your manager asks you to set up an automated nightly backup for the /var/www/html folder. It must log success or failure. You have 24 hours." This mirrors what junior DevOps engineers actually do in their first week.
📋 Assignment Requirements
- Accept a source folder as a script argument (e.g.,
./backup.sh /var/www/html) - Create a timestamped
.tar.gzbackup in/backups/directory - Log success or failure with timestamps to
/var/log/backup.log - Handle edge cases: source not found, backup dir doesn't exist, disk full
- Use functions, variables, and proper error handling (
set -e) - Bonus: Delete backups older than 7 days automatically
- Bonus: Send an email alert on failure