Unix Course
Master professional Unix workflows, shell scripting, Linux automation, DevOps pipelines & production system engineering.
Architecture
Unix Command Execution Lifecycle
From a typed command to terminal output — through the shell, kernel, system resources and back.
Enterprise learning path
Unix Fundamentals
- 1Unix HomeNext up
Welcome to the complete Unix course — your roadmap from absolute beginner to a confident, production-grade Linux & DevOps engineer who automates servers safely every day.
- 2Introduction to Unix
Unix is a multi-user, multitasking operating system born at Bell Labs in 1969 — it powers macOS, Linux, Android and 96% of the world's top web servers.
- 3History of Unix & Linux
Linux is a free, open-source Unix-like kernel created by Linus Torvalds in 1991 — combined with GNU tools, it became the operating system of the cloud.
- 4What is a Shell?
A shell is the program that reads your typed commands, asks the kernel to run them, and prints the result — bash, zsh and fish are popular modern shells.
- 5Installing Linux/Unix Environment
You can run Linux today inside WSL on Windows, with Docker on any OS, on a free cloud VM (AWS / GCP / Azure), or natively on a laptop with Ubuntu or Fedora.
- 6Understanding the Terminal
The terminal is the text window where you talk to the shell — knowing your prompt, cursor, history (↑) and tab-completion makes you 10× faster.
- 7Basic Unix Commands
Core commands like pwd, ls, cd, cat, echo and man form the alphabet of every Linux engineer.
- 8Working with Files & Directories
cp, mv, rm, mkdir and touch are the four-letter verbs you will type thousands of times — master their flags.
- 9File Paths Explained
Paths can be absolute (start with /) or relative (start from $PWD) — confusing the two is the #1 source of cron failures.
- 10Viewing File Contents
cat, less, head, tail and tail -f let you read tiny configs, paginate huge logs, and stream live output.
- 11Editing Files
nano is the friendly editor for beginners; vim is the universal editor every Linux server already has — at least learn i, :wq, :q!.
- 12User & Group Basics
Linux is multi-user — every file has an owning user and group, and every process runs as some user.
- 13Unix Philosophy
Do one thing well, work with plain text, compose with pipes — these 1970s rules still produce the most powerful automation in 2026.
- 14Command Line Productivity
Tab completion, !!, !$, Ctrl+R reverse search, aliases and tmux turn the terminal into a productivity superpower.
- 15Unix Best Practices
Best practices like set -euo pipefail, quoting variables, validating input, and never running as root separate hobby scripts from production-grade engineering.
Linux File System & Navigation
- 16Linux File System Structure
The Filesystem Hierarchy Standard (FHS) places config in /etc, logs in /var/log, users in /home and binaries in /usr/bin — same on every distro.
- 17Root Directory Explained
/ is the single root of the Linux tree — every drive, USB stick and network share is mounted somewhere underneath, never as D: or E:.
- 18File Permissions
Every file has read, write and execute bits for owner, group and others — written as -rwxr-x--- or numerically as 750.
- 19chmod Command
chmod changes permissions — numeric (chmod 644 file) or symbolic (chmod u+x script).
- 20chown Command
chown user:group file changes the file's owner and group — essential after creating files as root or moving them between users.
- 21Symbolic Links
A symlink is a pointer to another path — like a desktop shortcut.
- 22Hard Links
A hard link is a second name for the same inode on disk — both names share the data and only delete it when the last link is removed.
- 23Finding Files
find / -name '*.log' -mtime +30 -size +100M locates large old logs in seconds — the swiss-army knife of Linux housekeeping.
- 24Searching with grep
grep -rn 'ERROR' /var/log recursively scans logs with line numbers — combine with --include and -A/-B for context.
- 25Working with Archives
tar -czf out.tar.gz dir/ bundles files into a portable, compressed archive — the universal Unix backup format.
- 26Compression Commands
gzip, bzip2, xz and zstd trade speed vs ratio — zstd is the modern default for log archives.
- 27Disk Usage Monitoring
df -h shows free space per partition; du -sh * shows what is hogging space — together they keep your servers healthy.
- 28Environment Variables
export NAME=value sets a variable for child processes; env lists them all — the standard way to configure 12-factor apps.
- 29PATH Variable
$PATH is the colon-separated list of directories the shell searches for executables — putting /usr/local/bin first lets you override system tools.
- 30File System Security
Use umask, sticky bits, setuid/setgid sparingly, and ACLs (setfacl) for fine-grained control on shared servers.
Shell Scripting Basics
- 31Introduction to Shell Scripting
A shell script is just a text file of commands the shell will run top to bottom — the easiest way to automate any repeatable task on Linux.
- 32Creating Bash Scripts
Create script.sh, add #!/bin/bash as the first line, chmod +x script.sh, then run with ./script.sh.
- 33Variables in Bash
NAME=jane defines a variable; echo "$NAME" reads it — no spaces around =, always quote the read.
- 34User Input Handling
read -p "Name: " name prompts for input; for sensitive values use read -s to hide what is typed.
- 35Conditional Statements
if [[ $count -gt 0 ]]; then ...; fi branches your script based on numbers, strings or file tests like -f, -d, -z.
- 36Loops in Shell Scripts
for f in *.log; do ...; done, while read line, until — the three loop forms cover virtually every batch task.
- 37Functions in Bash
my_func() { echo "$1"; } defines a function; call as my_func value.
- 38Arrays in Bash
arr=(a b c) creates an array; access with "\${arr[0]}" and iterate with for x in "\${arr[@]}".
- 39Reading Files in Scripts
while IFS= read -r line; do ...; done < file.txt is the safe way to process a file line by line without breaking on spaces.
- 40Command Line Arguments
$1, $2, ...
- 41Exit Codes
Every command returns 0 (success) or non-zero (failure).
- 42Error Handling
set -e exits on any error, trap 'cleanup' EXIT guarantees cleanup, and || { echo fail; exit 1; } handles a single command.
- 43Debugging Shell Scripts
Run with bash -x script.sh to see every expanded command — the fastest way to find why a script behaves differently from the terminal.
- 44Script Optimization
Avoid useless cat file | grep (use grep file), prefer built-ins, batch find with -exec ...
- 45Real Automation Scripts
Real scripts: rotate logs, snapshot databases, restart unhealthy containers, sync S3 — each one a 30-line bash file that saves hours per week.
Automation & Task Scheduling
- 46Introduction to Automation
Automation means turning manual SSH-and-type rituals into versioned scripts — fewer mistakes, faster recovery, audit trails for free.
- 47Cron Jobs
Cron is the classic Unix scheduler — five time fields plus a command, run by the crond daemon every minute.
- 48crontab Command
crontab -e opens your jobs in an editor; crontab -l lists them; jobs run with a minimal environment.
- 49Scheduling Scripts
Schedule a backup at 2 AM with 0 2 * * * /usr/local/bin/backup.sh — always use absolute paths and redirect output to a log.
- 50System Monitoring Scripts
A 10-line bash script can collect CPU, RAM and disk every 5 min and alert when thresholds break — the foundation of every observability stack.
- 51Backup Automation
Automate daily tar.gz snapshots, weekly off-server rsync to S3, and monthly restore drills — backup that isn't tested doesn't exist.
- 52Log Rotation Basics
logrotate compresses, renames and deletes old logs on a schedule — without it, log files grow until your disk dies at 3 AM.
- 53File Cleanup Automation
find /tmp -mtime +7 -delete in cron keeps temp dirs sane; same pattern for old artifacts, build caches and rotated logs.
- 54Email Automation Scripts
echo body | mail -s 'subject' ops@co sends an alert from a script — combined with thresholds it powers a poor-man's PagerDuty.
- 55Automated Deployment Scripts
deploy.sh = pull artifact, stop service, swap symlink, start, health-check — atomic and reversible in one bash file.
- 56Monitoring Disk Space
df -P | awk 'NR>1 && $5+0 > 90' in cron paged ops before disks ever fill — three lines of bash, infinite peace of mind.
- 57Process Automation
Restart crashed workers with systemd Restart=always, or a watchdog script that pgreps and systemctl restarts them.
- 58Task Scheduling Best Practices
Pin jobs to a non-root user, log to dated files, use flock to prevent overlapping runs, and document each cron line with a comment.
- 59Automation Security
Never hard-code secrets — pull from .env with restricted perms, use SSH keys not passwords, and audit cron + sudoers regularly.
- 60Production Automation Systems
Real production combines bash scripts + systemd timers + Ansible playbooks + GitHub Actions — every piece versioned, reviewed and observable.
Advanced Shell Scripting
- 61Advanced Bash Scripting
Advanced bash means parameter expansion (\${var//old/new}), here-docs, process substitution and arithmetic — power features that replace a lot of awk/sed.
- 62sed Command
sed is the stream editor: sed -i 's/old/new/g' file replaces in place — perfect for config tweaks across many servers.
- 63awk Command
awk is a column-aware mini language: awk '$3 > 100 {print $1}' filters and projects in one expression.
- 64Regular Expressions
Regex powers grep, sed and awk — anchors, classes, quantifiers and groups let you match any text pattern in seconds.
- 65Process Management
ps, top, htop, nice, renice and cgroups control which processes run, when, and with what priority.
- 66Background Processes
cmd &, jobs, fg, bg, nohup and disown let you launch long jobs and survive disconnects.
- 67Pipes & Redirection
|, >, >>, 2>&1, <<EOF — five operators that compose every Unix tool into a custom pipeline.
- 68Linux Signals
kill -l lists 30+ signals; SIGTERM (15) is graceful, SIGKILL (9) is forceful, SIGHUP (1) often reloads config without restart.
- 69Inter-Process Communication
Pipes, FIFOs (mkfifo), Unix sockets and shared memory let processes talk — the same primitives that power Docker, Postgres and Nginx.
- 70Advanced Text Processing
Combine cut, tr, paste, join, sort -k and uniq -c to massage CSVs, logs and reports without ever opening Excel.
- 71Parsing Log Files
Parse Nginx, syslog and JSON logs with awk, jq and grep to count errors, find slow endpoints, and detect intrusions.
- 72Shell Performance Optimization
Profile with time, avoid sub-shells, prefer built-ins, batch I/O — a tuned bash pipeline can outperform a naive Python script 10×.
- 73Modular Shell Scripts
Split scripts into lib/ functions sourced with source ./lib/log.sh — testable, reusable and grep-able like real code.
- 74Enterprise Shell Workflows
Enterprise shell means linting with shellcheck, unit testing with bats, packaging into .deb/.rpm and shipping via internal repo.
- 75Production Script Engineering
Production-grade scripts use set -euo pipefail, trap handlers, structured logs, idempotent operations and exit codes that drive automation upstream.
Unix Networking & Security
- 76Networking Basics
Linux networking is built on TCP/IP — every connection is an IP+port, and the kernel routes packets via the routing table you can inspect with ip route.
- 77SSH Fundamentals
SSH (Secure Shell) is the encrypted protocol every engineer uses to log into Linux servers — ssh user@host opens a shell over the network.
- 78SCP & File Transfer
scp file user@host:/path copies files over SSH; rsync -avz is smarter — only sending changed bytes.
- 79Linux Firewalls
iptables and the modern nftables filter packets per rule chain; ufw wraps them with friendly commands like ufw allow 443.
- 80Network Troubleshooting
Layer-by-layer: ping for IP, traceroute for routing, dig for DNS, curl -v for HTTP — solves 90% of 'site is down' alerts.
- 81ping & traceroute
ping host tests reachability and latency; traceroute host shows every hop — together they isolate which network is broken.
- 82netstat & ss Commands
ss -tulpn (modern) lists every TCP/UDP socket, the listening port and the owning process — indispensable for 'who's using port 8080?' Beginner analogy: think of Unix as a kitchen.
- 83User Security
Disable unused accounts, enforce strong passwords with PAM, expire stale logins with chage, and audit with last + lastb.
- 84Permission Hardening
Restrict /etc/shadow to root, remove world-write bits with find / -perm -o+w, and lock down /tmp with noexec mount option.
- 85SSH Key Authentication
Generate keys with ssh-keygen -t ed25519, copy with ssh-copy-id, then disable password login in sshd_config — the gold standard for server access.
- 86Linux Logs
Logs live in /var/log and journalctl — auth.log, syslog, kern.log and per-app dirs tell you what happened and when.
- 87Security Monitoring
fail2ban bans brute-force IPs, auditd records every syscall, and journalctl -p err surfaces kernel errors — basic SOC on a single VM.
- 88Secure Automation
Secure automation: vault secrets in HashiCorp Vault or aws secretsmanager, never echo them, and rotate SSH keys quarterly.
- 89Production Security Practices
Production security = key-only SSH + ufw default-deny + unattended-upgrades + fail2ban + nightly lynis audits + offsite encrypted backups.
- 90Enterprise Unix Security
Enterprises layer SELinux/AppArmor, central LDAP/AD auth, MFA via PAM, SIEM-streamed audit logs, and CIS benchmarks across thousands of Linux hosts.
Real-World DevOps Automation
- 91DevOps Introduction
DevOps unites code + infrastructure + operations under one workflow — Linux + git + bash + a CI runner is the minimum viable DevOps stack.
- 92CI/CD Basics
CI runs tests on every commit, CD ships every green build to production — both run as bash scripts on Linux runners (GitHub Actions, GitLab, Jenkins).
- 93Deployment Automation
Modern deploys: build artifact → push to registry → SSH into target or call k8s → swap version → health-check → roll back if red — all bash and curl.
- 94Server Provisioning
Spin up Linux servers reproducibly with cloud-init, Terraform, Ansible or Pulumi — bake an AMI/image and treat servers as cattle, not pets.
- 95Docker Automation Basics
docker build -t app:$SHA .
- 96Kubernetes Script Automation
kubectl apply, helm upgrade and kustomize build in bash drive Kubernetes — and a one-line kubectl rollout undo recovers fast.
- 97Infrastructure Monitoring
Pair Prometheus node_exporter on every Linux box with Grafana dashboards and Alertmanager — bash install.sh bootstraps it all.
- 98Log Management Systems
Ship logs with vector, fluent-bit or journalctl --output=json to Loki / ELK / CloudWatch for searchable, retained, alertable logs.
- 99Cloud Automation Scripts
AWS, GCP and Azure all expose CLIs that you call from bash: aws s3 sync, gcloud compute, az vm — automation in 5 lines.
- 100Production Incident Automation
Auto-runbooks: detect → page → snapshot logs → restart service → open ticket — every step a versioned bash script, fully audited.
- 101SaaS Deployment Workflows
Modern SaaS deploys 50× a day: PR → CI → preview env → merge → blue/green to prod → instant rollback — Linux + Docker + bash all the way down.
- 102Enterprise Monitoring Systems
Enterprise monitoring stitches together Prometheus, Grafana, Loki, Tempo and PagerDuty — every component running on Linux and configured by bash + Ansible.
- 103Startup DevOps Workflow
Lean startups run on Vercel/Fly.io/Render previews, GitHub Actions, a single Postgres on Linux and a 100-line deploy.sh — that's the entire ops team.
- 104Real Production Pipelines
Real pipelines tag a release, build a Docker image, run integration tests, deploy to staging, gate on metrics, then promote to prod — orchestrated by bash.
- 105Enterprise Automation Architecture
Enterprises layer self-hosted runners, golden Linux images, secret stores, policy gates and audit pipelines on top of the same Unix primitives — at thousand-server scale.
Practice & Interview Preparation
- 106Unix Exercises
Hands-on drills: navigate the filesystem, manage permissions, pipe commands, and write a 20-line backup script — repeat until automatic.
- 107Shell Scripting Challenges
Challenges: write a script that finds the 10 largest files, parses Nginx logs into top URLs, and rotates logs older than 30 days.
- 108Automation Challenges
Automation drills: schedule a healthcheck cron, build a 1-line backup-to-S3, write an idempotent install script for a new VM.
- 109Linux Administration Tasks
Admin tasks: add a user, configure ufw, install nginx via package manager, set up systemd service, and ship logs to journald.
- 110Debugging Challenges
Debug drills: a cron job works manually but fails at 2 AM, a service is using port 8080, a script consumes 100% CPU — find and fix in < 10 min.
- 111Unix Interview Questions
Common interview questions: difference between hard and soft links, what happens during fork(), how pipes work, how to find a file using 100% disk.
- 112Mock DevOps Interviews
A mock DevOps interview asks scenario questions: 'production is down — walk me through your Linux debugging from SSH to root cause in 10 minutes.' Beginner analogy: think of Uni…
- 113Real Production Scenarios
Real scenarios: disk full, fork bomb, leaked SSH key, runaway cron — for each, the senior path from detection to remediation to postmortem.
- 114Security Challenges
Security drills: harden a fresh Ubuntu VM, audit sudoers, detect a brute-force attempt in auth.log, and rotate compromised SSH keys fleet-wide.
- 115Performance Optimization Tasks
Performance tasks: profile a slow bash pipeline, replace a fork-heavy loop with built-ins, and tune a Postgres or Nginx host with sysctl.
- 116Infrastructure Challenges
Infrastructure drills: provision a 3-node cluster with Terraform, configure with Ansible, deploy a sample app, and add monitoring — end-to-end in < 1 hour.
- 117Shell Scripting Assessments
Scripting assessments measure your fluency with set -euo pipefail, trap, getopts, idempotency and exit-code discipline — the senior bar.
- 118CI/CD Workflow Tasks
CI/CD tasks: write a GitHub Actions workflow that lints + tests + builds Docker, gates merges on green, and deploys to a Linux preview environment.
- 119Enterprise Unix Scenarios
Enterprise scenarios: 10K-server fleet patching, audit-log compliance for SOC2, golden-image bake pipelines, and centralised secret rotation.
- 120Production Automation Challenges
Production automation drills: build an idempotent installer, an atomic deploy, a self-healing service watcher, and a one-button disaster-recovery restore.