Bash · online compiler

Run Bash online

Run Bash 5 scripts online — sandboxed in a Firecracker microVM.

Version
Firecracker microVM live per-test verdicts multi-file compile

Bash is the default interactive shell on nearly every Linux distribution and the workhorse of glue code everywhere. Run a script here to test how it behaves in a real Linux environment, without touching your own machine.

ls-judge runs Bash 5 inside a Firecracker microVM: every submission gets its own kernel, network namespace, and jailer chroot. That means system calls behave the way they do in production, not the way they do in a wrapped simulator.

Pipe stdin from the test-case panel, exec external tools that ship in the sandbox (coreutils, sed, grep, awk), and watch stdout/stderr stream back per test.

Starter code

What you get in Bash

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

bash
Bash 5
read n; echo $((n * 2))
stdin →21
expected →42
FAQ

Common questions about Bash on ls-judge

Which Bash version?
Bash 5.x with associative arrays, [[ ]] tests, coproc — the modern feature set.
What tools are in the sandbox PATH?
The GNU coreutils, sed, awk, grep, tr, cut. Networking tools (curl, wget) are absent by design.
Does networking work?
No. Every microVM has a hermetic network namespace with no egress route.
What is the entry filename?
main.sh — the runner executes it with bash under a timeout.
Further reading
Also try