Bash Course

Bash is the shell that runs behind the terminal on nearly every Linux server and Mac — learning to script it turns repetitive command-line work into something you write once and run forever.

What you'll learn

This course starts with the absolute basics — what a shell script is, the shebang line, and making a file executable — then works through the core building blocks every script needs: variables, reading user input and command-line arguments, conditionals, and the three loop forms. From there it moves into the tools that make Bash genuinely useful for real work: functions, arrays, Bash's built-in string manipulation, reading and writing files, and chaining commands together with pipes and redirection.

The final two lessons tie everything together — proper exit-code error handling with set -euo pipefail, and a complete, realistic automation script that pulls in nearly everything covered earlier. Every example shows a real script alongside the exact terminal output running it produces.

Lessons

  1. Introduction
  2. Variables
  3. User Input & Arguments
  4. Conditionals
  5. Loops
  6. Functions
  7. Arrays
  8. String Manipulation
  9. Reading & Writing Files
  10. Pipes & Redirection
  11. Exit Codes & Error Handling
  12. A Real Automation Script
Where to start: begin with Introduction and work through in order — later lessons (functions, arrays, the final automation script) assume you're comfortable with the variables, conditionals, and loops covered earlier. If you've used another programming language before, Bash's syntax will feel unusual at first even though the ideas are familiar — the quoting and spacing rules are worth reading carefully rather than skimming.