Bash Scripting Cheat Sheet — Scripts, Loops & Functions

Interactive Bash scripting reference with variables, loops, conditions, functions, arrays, and string operations. Searchable examples. Free, no signup required.

Help Us Improve
Be the first to rate!

Frequently Asked Questions

How do I use Bash Cheat Sheet?
Browse by category (variables, loops, functions) or search for a specific syntax. Each example is runnable and copyable.
Is Bash Cheat Sheet free?
Yes, Bash Cheat Sheet on ToolPix is 100% free with no signup or installation required.
Is my data safe?
This is a static reference tool. No data is entered or transmitted.
What is the difference between sh and bash?
sh is the original POSIX shell. bash is a superset with arrays, [[]], string manipulation, and more. Use #!/bin/bash if you need bash-specific features.
How do I run a bash script?
Make it executable with chmod +x script.sh then run with ./script.sh. Or run directly with bash script.sh without needing execute permission.