Free · No signup
Bash Tutorial
Learn Bash from the ground up. Every code example on every lesson is real and runnable — the output shown was captured from an actual execution on this site's own interpreter, not typed by hand — and you can try each one yourself with one click.
- 1Introduction to Bash
- 2Your First Bash Script
- 3Variables
- 4Quoting
- 5Exit Codes
- 6Conditionals
- 7Loops
- 8Arrays
- 9Associative Arrays
- 10Functions
- 11Function Return Values
- 12String Manipulation
- 13Parameter Expansion
- 14Arithmetic
- 15Command Substitution and Pipes
- 16Redirection and Heredocs
- 17Case Statements
- 18Error Handling, and a Closing Look
More lessons are added regularly. Want to practice outside the tutorial? Open the Bash compiler. Prefer Swift? Read the Swift tutorial. Prefer Kotlin? Read the Kotlin tutorial. Prefer Java? Read the Java tutorial. Prefer C#? Read the C# tutorial. Prefer C++? Read the C++ tutorial. Prefer C? Read the C tutorial. Prefer Rust? Read the Rust tutorial. Prefer Go? Read the Go tutorial. Prefer TypeScript? Read the TypeScript tutorial. Prefer JavaScript? Read the JavaScript tutorial. Prefer Python? Read the Python tutorial. Prefer Perl? Read the Perl tutorial. Prefer Ruby? Read the Ruby tutorial. Prefer R? Read the R tutorial. Prefer PHP? Read the PHP tutorial. Prefer Hindi? Hindi mein padhein. Prefer Urdu? Roman Urdu mein parhein. ¿Prefieres español? Leer en español. Prefere português? Ler em português.