Learn Bash
Structured lessons from the basics up — follow the path below in order, at your own pace.
-
1
Level 1 — Beginner Beginner 28 lessons
Start here if you have never used a terminal before. No programming experience is required — work through these lessons in order, since each...
Lessons in this module
What Is Bash? Why Learn Bash? What Can You Do With Bash? Opening a Terminal Your First Commands How the Shell Runs Commands Navigating the File System Working with Files and Directories Viewing Files Wildcards and Globbing Redirection: Sending Output to Files Pipes: Connecting Commands Your First Script Variables Quoting Command Substitution Arithmetic Script Arguments Reading Input Exit Codes, &&, and || Conditionals: if and Tests File and String Tests The case Statement for Loops while Loops and Reading Files break and continue File Permissions Comments, Style, and ShellCheck -
2
Beginner Projects Beginner 1 lesson
Build these as scripts using what Level 1 covered — commands, pipes, redirection, variables, quoting, conditionals, and loops. Start each fi...
-
3
Level 2 — Intermediate Intermediate 20 lessons
These lessons cover functions, arrays and associative arrays, exit codes and error handling, argument parsing, grep, sed, awk, find and xarg...
Lessons in this module
Functions Local Variables and Return Values Arrays Associative Arrays String Manipulation Error Handling in Scripts Parsing Options with getopts Searching Text with grep Editing Text with sed Processing Columns with awk The Text Toolkit: sort, uniq, cut, tr, and Friends Finding Files: find and xargs Processes and Job Control Environment Variables and Configuration printf and Here Documents Dates and Times Archives and Compression Working with JSON and APIs Debugging Scripts Testing Scripts with Bats -
4
Intermediate Projects Intermediate 1 lesson
Build these using functions, arrays, argument parsing, exit codes, and the text processing tools from Level 2. Check each with ShellCheck. 1...
-
5
Level 3 — Advanced Advanced 16 lessons
These lessons cover strict mode and robust scripting, traps and cleanup, advanced expansions, process substitution, concurrency, portability...
Lessons in this module
Strict Mode: set -euo pipefail Traps and Cleanup Advanced Expansions and Shell Options Subshells, Grouping, and Process Substitution Concurrency and Locking Handling File Names Safely Regular Expressions in Bash Portability and POSIX sh Performance Security for Shell Scripts Logging and User-Friendly Output Scheduling: cron and systemd Timers Remote Automation with SSH Shell in Containers and CI Structuring Larger Scripts and Tools When to Use Another Language -
6
Advanced Projects Advanced 1 lesson
Build these using strict mode, traps, concurrency, portability, security, and the automation practices from Level 3. 1. Deployment Script Wr...
-
7
What You Should Know Now — and What's Next 1 lesson
What You Should Know Now Navigating the file system and managing files from the command line Pipes, redirection, and combining small tools t...