Beginner
Bash
Learn Bash scripting from variables to robust, production-ready scripts. Loops, arrays, traps, set -euo pipefail, and a server bootstrap capstone.
12 lessons5.7h hands-on11 languages
Start learning freeBash course12 lessons, in order
- 120 min
What Is Bash
Shell vs terminalBash vs sh vs zshInteractive shell vs scriptWhere Bash fits in DevOps - 225 min
Shebang and Your First Script
Shebang#!/usr/bin/env bashChmod +x./script.sh vs bash script.shExit codes - 325 min
Variables and Quoting
Variable assignmentDouble quotes vs single quotes${var} bracesCommand substitution $(...) - 430 min
Conditionals and Tests
If statement[[ ]] testsString testsFile tests -f -d -e&& and ||Case statement - 525 min
Loops
For loopWhile loopUntil loopFor f in *.txt globbingC-style for loopBreak and continue - 625 min
Functions
Function definitionPositional args $1 $@ $#Return for exit codesEcho for outputLocal variables - 725 min
Arrays
Indexed arrays${arr[@]}${#arr[@]} lengthAssociative arrays declare -AIterating arrays - 825 min
String and Arithmetic Expansion
${var#prefix}${var%suffix}${var//old/new}$(( arith ))Printf formatting - 925 min
IO Redirection and Pipes
>>><2>2>&1&>+3 - 1030 min
Error Handling and Traps
Set -eSet -uSet -o pipefailTrap on EXITTrap on ERRCleanup functions - 1125 min
Debugging and Best Practices
Bash -xSet -xShellcheckSafe quotingNever parse ls[[ vs [+1 - 1260 min
Capstone: Server Bootstrap Script
Idempotent provisioningInstalling packagesCreating usersSSH key setupSystemd timersLogging+2
Learn Bash in your language
Every lesson, quiz, and tutor reply renders in your language. The AI tutor matches the language you ask in.
Learn Bash in EnglishAprende Bash en españolAprenda Bash em portuguêsتعلّم Bash بالعربيةBash را به فارسی یاد بگیریدApprenez Bash en françaisBash हिन्दी में सीखें用中文学习 BashPelajari Bash dalam bahasa IndonesiaИзучайте Bash на русскомBash auf Deutsch lernen
