Free Online Course · Self-paced
Shell Scripting & Bash Tutorial (Free Course)
Free Bash and shell scripting course for Linux — arguments, variables, loops, functions, arrays, real scripts, and automation patterns. 30+ hands-on lessons organized into chapters; examples tested on Bash on RHEL, Rocky, and Ubuntu.
- 37 parts
- ~266 min total
- Beginner to Intermediate
- Updated Jun 2026
This free shell scripting course walks you through Bash on Linux from first scripts to patterns you will reuse in automation, cron jobs, and one-off admin tasks. Each lesson is self-contained, but the chapters build in a sensible order: start with arguments and branching, strengthen variables and loops, then move into getopts, arrays, and small real-world utilities.
Use Start the course to open the first lesson, or jump to any chapter if you already know the basics. Every guide is written for copy-paste examples on common distros (RHEL family and Ubuntu).
If you landed here from an old Shell scripting category link on the site, this hub is the new home for that learning path.
What you'll learn
- Write safe scripts with proper arguments, quoting, and exit codes
- Use variables, strings, numbers, loops, and functions the way Bash expects
- Work with arrays, getopts, and parallel jobs for real automation tasks
- Build small utilities — calculators, progress output, timing, and file checks
Prerequisites
- A Linux or WSL environment with Bash 4+ (any recent distro is fine)
- Ability to open a terminal, edit a text file, and run chmod +x on a script
- Optional — basic familiarity with cd, ls, and mkdir
Syllabus
9 chapters · 37 lessons · ~266 min of reading
-
2 Variables, Strings, and Numbers 7 lessons
- Part 4 Increment and update variables 5 min read
- Part 5 Concatenate strings safely 6 min read
- Part 6 Compare strings in Bash 10 min read
- Part 7 Compare numbers in Bash 11 min read
- Part 8 Counters and running totals 3 min read
- Part 9 unshift-style patterns in Bash 9 min read
- Part 10 echo, printf, and newline control 3 min read
-
6 Files, Checks, and Text Parsing 3 lessons
-
8 Processes, Timing, and the System 6 lessons
- Part 31 Run tasks in parallel and collect exit codes 4 min read
- Part 32 Measure script execution time 3 min read
- Part 33 Prevent duplicate script instances 3 min read
- Part 34 Top CPU and memory consumers from a script 10 min read
- Part 35 Login history and success / failed logins 6 min read
- Part 36 Create many users from a data file 7 min read
-
9 Environment and Shell Basics 1 lesson

