unix

    Unix Course

    Master professional Unix workflows, shell scripting, Linux automation, DevOps pipelines & production system engineering.

    120
    Lessons
    8
    Modules
    0/120
    Completed

    Architecture

    Unix Command Execution Lifecycle

    From a typed command to terminal output — through the shell, kernel, system resources and back.

    User Command
    terminal
    Shell
    bash / zsh
    Kernel
    syscalls
    System
    files / net
    Process
    fork+exec
    Output
    stdout
    Pipes
    stdin / stdout / stderr
    Permissions
    user · group · others
    Cron / systemd
    scheduled jobs
    CI/CD
    bash + SSH + runners
    Curriculum

    Enterprise learning path

    8 modules · 120 lessons

    Unix Fundamentals

    0/15 complete
    1. 1
      Unix Home
      Next 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.

    2. 2
      Introduction 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.

    3. 3
      History 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.

    4. 4
      What 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.

    5. 5
      Installing 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.

    6. 6
      Understanding 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.

    7. 7
      Basic Unix Commands

      Core commands like pwd, ls, cd, cat, echo and man form the alphabet of every Linux engineer.

    8. 8
      Working with Files & Directories

      cp, mv, rm, mkdir and touch are the four-letter verbs you will type thousands of times — master their flags.

    9. 9
      File Paths Explained

      Paths can be absolute (start with /) or relative (start from $PWD) — confusing the two is the #1 source of cron failures.

    10. 10
      Viewing File Contents

      cat, less, head, tail and tail -f let you read tiny configs, paginate huge logs, and stream live output.

    11. 11
      Editing Files

      nano is the friendly editor for beginners; vim is the universal editor every Linux server already has — at least learn i, :wq, :q!.

    12. 12
      User & Group Basics

      Linux is multi-user — every file has an owning user and group, and every process runs as some user.

    13. 13
      Unix Philosophy

      Do one thing well, work with plain text, compose with pipes — these 1970s rules still produce the most powerful automation in 2026.

    14. 14
      Command Line Productivity

      Tab completion, !!, !$, Ctrl+R reverse search, aliases and tmux turn the terminal into a productivity superpower.

    15. 15
      Unix 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

    0/15 complete
    1. 16
      Linux 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.

    2. 17
      Root 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:.

    3. 18
      File Permissions

      Every file has read, write and execute bits for owner, group and others — written as -rwxr-x--- or numerically as 750.

    4. 19
      chmod Command

      chmod changes permissions — numeric (chmod 644 file) or symbolic (chmod u+x script).

    5. 20
      chown Command

      chown user:group file changes the file's owner and group — essential after creating files as root or moving them between users.

    6. 21
      Symbolic Links

      A symlink is a pointer to another path — like a desktop shortcut.

    7. 22
      Hard 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.

    8. 23
      Finding Files

      find / -name '*.log' -mtime +30 -size +100M locates large old logs in seconds — the swiss-army knife of Linux housekeeping.

    9. 24
      Searching with grep

      grep -rn 'ERROR' /var/log recursively scans logs with line numbers — combine with --include and -A/-B for context.

    10. 25
      Working with Archives

      tar -czf out.tar.gz dir/ bundles files into a portable, compressed archive — the universal Unix backup format.

    11. 26
      Compression Commands

      gzip, bzip2, xz and zstd trade speed vs ratio — zstd is the modern default for log archives.

    12. 27
      Disk Usage Monitoring

      df -h shows free space per partition; du -sh * shows what is hogging space — together they keep your servers healthy.

    13. 28
      Environment Variables

      export NAME=value sets a variable for child processes; env lists them all — the standard way to configure 12-factor apps.

    14. 29
      PATH Variable

      $PATH is the colon-separated list of directories the shell searches for executables — putting /usr/local/bin first lets you override system tools.

    15. 30
      File System Security

      Use umask, sticky bits, setuid/setgid sparingly, and ACLs (setfacl) for fine-grained control on shared servers.

    Shell Scripting Basics

    0/15 complete
    1. 31
      Introduction 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.

    2. 32
      Creating Bash Scripts

      Create script.sh, add #!/bin/bash as the first line, chmod +x script.sh, then run with ./script.sh.

    3. 33
      Variables in Bash

      NAME=jane defines a variable; echo "$NAME" reads it — no spaces around =, always quote the read.

    4. 34
      User Input Handling

      read -p "Name: " name prompts for input; for sensitive values use read -s to hide what is typed.

    5. 35
      Conditional Statements

      if [[ $count -gt 0 ]]; then ...; fi branches your script based on numbers, strings or file tests like -f, -d, -z.

    6. 36
      Loops in Shell Scripts

      for f in *.log; do ...; done, while read line, until — the three loop forms cover virtually every batch task.

    7. 37
      Functions in Bash

      my_func() { echo "$1"; } defines a function; call as my_func value.

    8. 38
      Arrays in Bash

      arr=(a b c) creates an array; access with "\${arr[0]}" and iterate with for x in "\${arr[@]}".

    9. 39
      Reading 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.

    10. 40
      Command Line Arguments

      $1, $2, ...

    11. 41
      Exit Codes

      Every command returns 0 (success) or non-zero (failure).

    12. 42
      Error Handling

      set -e exits on any error, trap 'cleanup' EXIT guarantees cleanup, and || { echo fail; exit 1; } handles a single command.

    13. 43
      Debugging 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.

    14. 44
      Script Optimization

      Avoid useless cat file | grep (use grep file), prefer built-ins, batch find with -exec ...

    15. 45
      Real 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

    0/15 complete
    1. 46
      Introduction to Automation

      Automation means turning manual SSH-and-type rituals into versioned scripts — fewer mistakes, faster recovery, audit trails for free.

    2. 47
      Cron Jobs

      Cron is the classic Unix scheduler — five time fields plus a command, run by the crond daemon every minute.

    3. 48
      crontab Command

      crontab -e opens your jobs in an editor; crontab -l lists them; jobs run with a minimal environment.

    4. 49
      Scheduling 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.

    5. 50
      System 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.

    6. 51
      Backup Automation

      Automate daily tar.gz snapshots, weekly off-server rsync to S3, and monthly restore drills — backup that isn't tested doesn't exist.

    7. 52
      Log Rotation Basics

      logrotate compresses, renames and deletes old logs on a schedule — without it, log files grow until your disk dies at 3 AM.

    8. 53
      File Cleanup Automation

      find /tmp -mtime +7 -delete in cron keeps temp dirs sane; same pattern for old artifacts, build caches and rotated logs.

    9. 54
      Email 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.

    10. 55
      Automated Deployment Scripts

      deploy.sh = pull artifact, stop service, swap symlink, start, health-check — atomic and reversible in one bash file.

    11. 56
      Monitoring 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.

    12. 57
      Process Automation

      Restart crashed workers with systemd Restart=always, or a watchdog script that pgreps and systemctl restarts them.

    13. 58
      Task 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.

    14. 59
      Automation Security

      Never hard-code secrets — pull from .env with restricted perms, use SSH keys not passwords, and audit cron + sudoers regularly.

    15. 60
      Production Automation Systems

      Real production combines bash scripts + systemd timers + Ansible playbooks + GitHub Actions — every piece versioned, reviewed and observable.

    Advanced Shell Scripting

    0/15 complete
    1. 61
      Advanced 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.

    2. 62
      sed Command

      sed is the stream editor: sed -i 's/old/new/g' file replaces in place — perfect for config tweaks across many servers.

    3. 63
      awk Command

      awk is a column-aware mini language: awk '$3 > 100 {print $1}' filters and projects in one expression.

    4. 64
      Regular Expressions

      Regex powers grep, sed and awk — anchors, classes, quantifiers and groups let you match any text pattern in seconds.

    5. 65
      Process Management

      ps, top, htop, nice, renice and cgroups control which processes run, when, and with what priority.

    6. 66
      Background Processes

      cmd &, jobs, fg, bg, nohup and disown let you launch long jobs and survive disconnects.

    7. 67
      Pipes & Redirection

      |, >, >>, 2>&1, <<EOF — five operators that compose every Unix tool into a custom pipeline.

    8. 68
      Linux Signals

      kill -l lists 30+ signals; SIGTERM (15) is graceful, SIGKILL (9) is forceful, SIGHUP (1) often reloads config without restart.

    9. 69
      Inter-Process Communication

      Pipes, FIFOs (mkfifo), Unix sockets and shared memory let processes talk — the same primitives that power Docker, Postgres and Nginx.

    10. 70
      Advanced Text Processing

      Combine cut, tr, paste, join, sort -k and uniq -c to massage CSVs, logs and reports without ever opening Excel.

    11. 71
      Parsing Log Files

      Parse Nginx, syslog and JSON logs with awk, jq and grep to count errors, find slow endpoints, and detect intrusions.

    12. 72
      Shell 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×.

    13. 73
      Modular Shell Scripts

      Split scripts into lib/ functions sourced with source ./lib/log.sh — testable, reusable and grep-able like real code.

    14. 74
      Enterprise Shell Workflows

      Enterprise shell means linting with shellcheck, unit testing with bats, packaging into .deb/.rpm and shipping via internal repo.

    15. 75
      Production 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

    0/15 complete
    1. 76
      Networking 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.

    2. 77
      SSH 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.

    3. 78
      SCP & File Transfer

      scp file user@host:/path copies files over SSH; rsync -avz is smarter — only sending changed bytes.

    4. 79
      Linux Firewalls

      iptables and the modern nftables filter packets per rule chain; ufw wraps them with friendly commands like ufw allow 443.

    5. 80
      Network Troubleshooting

      Layer-by-layer: ping for IP, traceroute for routing, dig for DNS, curl -v for HTTP — solves 90% of 'site is down' alerts.

    6. 81
      ping & traceroute

      ping host tests reachability and latency; traceroute host shows every hop — together they isolate which network is broken.

    7. 82
      netstat & 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.

    8. 83
      User Security

      Disable unused accounts, enforce strong passwords with PAM, expire stale logins with chage, and audit with last + lastb.

    9. 84
      Permission Hardening

      Restrict /etc/shadow to root, remove world-write bits with find / -perm -o+w, and lock down /tmp with noexec mount option.

    10. 85
      SSH 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.

    11. 86
      Linux Logs

      Logs live in /var/log and journalctl — auth.log, syslog, kern.log and per-app dirs tell you what happened and when.

    12. 87
      Security Monitoring

      fail2ban bans brute-force IPs, auditd records every syscall, and journalctl -p err surfaces kernel errors — basic SOC on a single VM.

    13. 88
      Secure Automation

      Secure automation: vault secrets in HashiCorp Vault or aws secretsmanager, never echo them, and rotate SSH keys quarterly.

    14. 89
      Production Security Practices

      Production security = key-only SSH + ufw default-deny + unattended-upgrades + fail2ban + nightly lynis audits + offsite encrypted backups.

    15. 90
      Enterprise 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

    0/15 complete
    1. 91
      DevOps Introduction

      DevOps unites code + infrastructure + operations under one workflow — Linux + git + bash + a CI runner is the minimum viable DevOps stack.

    2. 92
      CI/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).

    3. 93
      Deployment 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.

    4. 94
      Server Provisioning

      Spin up Linux servers reproducibly with cloud-init, Terraform, Ansible or Pulumi — bake an AMI/image and treat servers as cattle, not pets.

    5. 95
      Docker Automation Basics

      docker build -t app:$SHA .

    6. 96
      Kubernetes Script Automation

      kubectl apply, helm upgrade and kustomize build in bash drive Kubernetes — and a one-line kubectl rollout undo recovers fast.

    7. 97
      Infrastructure Monitoring

      Pair Prometheus node_exporter on every Linux box with Grafana dashboards and Alertmanager — bash install.sh bootstraps it all.

    8. 98
      Log Management Systems

      Ship logs with vector, fluent-bit or journalctl --output=json to Loki / ELK / CloudWatch for searchable, retained, alertable logs.

    9. 99
      Cloud 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.

    10. 100
      Production Incident Automation

      Auto-runbooks: detect → page → snapshot logs → restart service → open ticket — every step a versioned bash script, fully audited.

    11. 101
      SaaS 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.

    12. 102
      Enterprise Monitoring Systems

      Enterprise monitoring stitches together Prometheus, Grafana, Loki, Tempo and PagerDuty — every component running on Linux and configured by bash + Ansible.

    13. 103
      Startup 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.

    14. 104
      Real 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.

    15. 105
      Enterprise 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

    0/15 complete
    1. 106
      Unix Exercises

      Hands-on drills: navigate the filesystem, manage permissions, pipe commands, and write a 20-line backup script — repeat until automatic.

    2. 107
      Shell 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.

    3. 108
      Automation Challenges

      Automation drills: schedule a healthcheck cron, build a 1-line backup-to-S3, write an idempotent install script for a new VM.

    4. 109
      Linux Administration Tasks

      Admin tasks: add a user, configure ufw, install nginx via package manager, set up systemd service, and ship logs to journald.

    5. 110
      Debugging 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.

    6. 111
      Unix 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.

    7. 112
      Mock 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…

    8. 113
      Real Production Scenarios

      Real scenarios: disk full, fork bomb, leaked SSH key, runaway cron — for each, the senior path from detection to remediation to postmortem.

    9. 114
      Security 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.

    10. 115
      Performance 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.

    11. 116
      Infrastructure 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.

    12. 117
      Shell Scripting Assessments

      Scripting assessments measure your fluency with set -euo pipefail, trap, getopts, idempotency and exit-code discipline — the senior bar.

    13. 118
      CI/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.

    14. 119
      Enterprise Unix Scenarios

      Enterprise scenarios: 10K-server fleet patching, audit-log compliance for SOC2, golden-image bake pipelines, and centralised secret rotation.

    15. 120
      Production Automation Challenges

      Production automation drills: build an idempotent installer, an atomic deploy, a self-healing service watcher, and a one-button disaster-recovery restore.