Bash Programming Course
The shell scripting language of Linux and macOS, used to automate commands, control the filesystem, and glue other programs together.
What you'll learn
- ✓Setup & Basics
- ✓Variables & Types
- ✓Control Flow
- ✓Loops
- ✓Functions
- ✓Arrays
- ✓String Manipulation
- ✓Input/Output & Redirection
Skills you'll gain
Details to know
- Certificate of completion
- Flexible schedule
- 100% Free
- 13.3 hours total
Requirements
- No prior experience needed
- A computer with internet connection
- Passion to learn!
Description
This Bash course takes you from the very basics to real, practical skills you can use right away. Across 14 chapters and 160 lessons, you'll build a solid foundation in Bash through short, focused lessons paired with live, editable code examples.
Each chapter builds on the last, so concepts stick. You'll get quizzes after every chapter to check your understanding, and a live code editor to practice as you go — no separate setup or installation required.
Whether you're completely new to programming or picking up Bash as an additional skill, this course is self-paced and free, with lifetime access so you can revisit any lesson whenever you need a refresher.
Course Content
14 chapters · 160 lessons · 13.3 hours
- 📄 What is Bash? 5 min
- 📄 Running Scripts 5 min
- 📄 chmod +x 5 min
- 📄 The Shebang Line 5 min
- 📄 The echo Command 5 min
- 📄 Comments 5 min
- 📄 Your First Script 5 min
- 📄 Command Substitution 5 min
- 📄 The Shebang Line & Running Scripts 5 min
- 📄 echo and printf 5 min
- 📄 Introduction to Variables 5 min
- 📄 Exit Status and $? 5 min
- 📄 Variable Basics 5 min
- 📄 String Variables & Quoting Rules 5 min
- 📄 Quoting Rules 5 min
- 📄 Integer Arithmetic 5 min
- 📄 Environment Variables 5 min
- 📄 Environment Variables & export 5 min
- 📄 readonly Variables 5 min
- 📄 readonly and unset 5 min
- 📄 export 5 min
- 📄 Special Variables 5 min
- 📄 Special Variables ($0 $1 $?) 5 min
- 📄 Introduction to Arrays 5 min
- 📄 Default Values & Parameter Expansion Basics 5 min
- 📄 The read Command 5 min
- 📄 if/elif/else 5 min
- 📄 printf 5 min
- 📄 test and [ ] Operators 5 min
- 📄 Redirections (> >> 2>) 5 min
- 📄 [[ ]] Extended Test Operator 5 min
- 📄 Pipes 5 min
- 📄 case Statement 5 min
- 📄 /dev/null 5 min
- 📄 Logical Operators 5 min
- 📄 tee 5 min
- 📄 Numeric vs String Comparison Operators 5 min
- 📄 Here Documents (<<EOF) 5 min
- 📄 Nested and Compound Conditionals 5 min
- 📄 expr 5 min
- 📄 for Loop Over a List 5 min
- 📄 Arithmetic Expansion $(( )) 5 min
- 📄 C-Style for Loop 5 min
- 📄 let 5 min
- 📄 while Loop 5 min
- 📄 bc for Floating-Point Math 5 min
- 📄 until Loop 5 min
- 📄 Comparison Operators 5 min
- 📄 break and continue 5 min
- 📄 Increment and Decrement 5 min
- 📄 Looping Over Array Elements 5 min
- 📄 Math Functions 5 min
- 📄 Looping Over Command Output 5 min
- 📄 String Length 5 min
- 📄 Defining and Calling Functions 5 min
- 📄 Substring Extraction 5 min
- 📄 Function Parameters 5 min
- 📄 String Replacement 5 min
- 📄 Return Values and Exit Codes 5 min
- 📄 Local Variables and Scope 5 min
- 📄 String Comparison 5 min
- 📄 Recursion 5 min
- 📄 grep with Strings 5 min
- 📄 Sourcing Files to Share Functions 5 min
- 📄 Parameter Expansion for Length/Substring 5 min
- 📄 The test Command 5 min
- 📄 Search & Replace 5 min
- 📄 Case Conversion 5 min
- 📄 [[ ]] Extended Test 5 min
- 📄 Trimming/Removing Prefixes & Suffixes 5 min
- 📄 for Loop 5 min
- 📄 Splitting a String Into Words 5 min
- 📄 String Concatenation 5 min
- 📄 Checking Substrings/Prefixes 5 min
- 📄 Function Basics 5 min
- 📄 The read Command and Here-Strings 5 min
- 📄 Function Arguments 5 min
- 📄 stdin, stdout, stderr and File Descriptors 5 min
- 📄 Return Values 5 min
- 📄 Redirection Operators 5 min
- 📄 Local Variables 5 min
- 📄 Pipes and Chaining Commands 5 min
- 📄 Recursive Functions 5 min
- 📄 Here-Documents (<<EOF) 5 min
- 📄 Function Libraries 5 min
- 📄 The tee Command 5 min
- 📄 Discarding Output with /dev/null 5 min
- 📄 File Tests (-f -d -e) 5 min
- 📄 File Test Operators 5 min
- 📄 Reading Files 5 min
- 📄 Globbing and Wildcards 5 min
- 📄 Writing Files 5 min
- 📄 Reading a File Line by Line 5 min
- 📄 The find Command 5 min
- 📄 Writing and Appending to Files 5 min
- 📄 cp, mv, rm 5 min
- 📄 Directory Operations 5 min
- 📄 File Permissions 5 min
- 📄 find Command Basics 5 min
- 📄 stat 5 min
- 📄 Running Commands in the Background (&) and $! 5 min
- 📄 grep 5 min
- 📄 The wait Command 5 min
- 📄 Process IDs and the ps Command 5 min
- 📄 cut 5 min
- 📄 Signals and trap 5 min
- 📄 sort 5 min
- 📄 Subshells vs the Current Shell ( ( ) vs { } ) 5 min
- 📄 uniq 5 min
- 📄 Command Substitution vs Process Substitution 5 min
- 📄 wc 5 min
- 📄 Killing Processes 5 min
- 📄 Exit Codes and Checking $? Correctly 5 min
- 📄 set -e and set -u 5 min
- 📄 Error Handling 5 min
- 📄 set -e (Exit on Error) and Its Gotchas 5 min
- 📄 Logging 5 min
- 📄 set -u (Undefined Variables) and set -x (Trace Mode) 5 min
- 📄 Script Arguments with getopts 5 min
- 📄 trap ERR for Custom Error Handling 5 min
- 📄 Debug Mode (set -x) 5 min
- 📄 Writing a Custom Error/die Function 5 min
- 📄 Portability 5 min
- 📄 Validating Script Input and Arguments 5 min
- 📄 getopts for Parsing Command-Line Flags 5 min
- 📄 Positional Parameters and shift 5 min
- 📄 Process Substitution in Practice (diff <(...) <(...)) 5 min
- 📄 Arrays of Arguments ("$@" vs "$*" Quoting Difference) 5 min
- 📄 Nameref Variables (declare -n) for Passing Arrays by Reference 5 min
- 📄 Heredoc Templating (Generating a Config File from Variables) 5 min
- 📄 Default/Fallback Argument Handling 5 min
- 📄 Quoting Pitfalls and Why to Always Quote Variables 5 min
- 📄 set -euo pipefail as a Script Header 5 min
- 📄 Structuring a Script (Functions, main() Pattern, Exit at the End) 5 min
- 📄 Idempotent Scripts (Safe to Re-Run) 5 min
- 📄 Logging in Scripts (Timestamped log Function) 5 min
- 📄 Writing Portable Scripts (Bash-isms vs POSIX sh) 5 min
- 📄 Capstone: A Real-World Backup/Cleanup Script 5 min
Reviews
Be the first to review this course
Offered by
Cookies & Cursor Technologies
Free, quality programming tutorials for everyone.
Frequently Asked Questions
Yes, completely free — no signup required to start, and no hidden costs.
Yes, on completion of all 160 lessons you'll earn a Bash certificate of completion.
About 13.3 hours at your own pace — go as fast or slow as you like.
Use our Try it live code editor to experiment, and the quizzes after each chapter to check your understanding as you go.
No separate app needed — access every lesson and the code editor from any device via your browser.