Online Bash Shell
This online Bash shell runs your shell scripts in GNU Bash 5.3 on Linux, straight from the browser. Write a script, press Run and watch the output, or practise commands like grep, sed and awk without a Linux machine of your own.
How to run Bash code online
- This page opens with Bash selected, so you can start typing straight away.
- Write your code in the editor, or open files from your computer: single files, or a whole project as a .zip.
- Press Run, or Ctrl+Enter. The output appears in the panel beside the editor, and when the program asks for input you type it there and press Enter.
- Share a copy with a link, or save your files to your computer.
GNU Bash 5.3 on Online IDE
- Scripts run in GNU Bash 5.3 on Alpine Linux, with the usual commands such as grep, sed, awk, sort and cut.
- read waits for a line of input: type it in the output panel and press Enter.
- Pass arguments in the arguments box above the output and read them as $1, $2 and $@.
Example: a Bash program that reads input
read -p "Enter a directory name: " dir
mkdir -p "$dir"
for i in 1 2 3; do
echo "file $i" > "$dir/file$i.txt"
done
ls -l "$dir"
wc -l "$dir"/*.txt
Features of this tool
- Simple and fastA clean, lightweight editor that opens instantly.
- Powered by AceThe Ace code editor, with syntax highlighting, autocompletion and bracket matching.
- Interactive programsType input into the terminal while your program runs.
- Several filesWork in tabs, open files or a .zip from your computer, and save the project back to disk.
- Made for learningHelpful for beginners to learn and practice programs.
- Light and dark themesPlus 39 editor themes, a choice of coding fonts, and Vim, Emacs or VS Code keys.
- Keep your outputCopy or download the program output in one click.
- Share by linkSave your code in the cloud and open it anywhere.
Frequently asked questions
Which shell does the online Bash shell use?
GNU Bash 5.3 on Alpine Linux, with the standard command-line tools.
Can a Bash script read input?
Yes. read waits for a line you type in the output panel. read -p "Prompt: " var shows a prompt first.
How do I pass arguments to my script?
Type them in the arguments box above the output before you press Run, then use $1, $2 or $@ in the script.
Contact us
For any feedback, queries or issues, please feel free to contact us or write to . We value your input and are committed to providing the best possible experience for our users.