Free Online Bash Playground
Write a Bash script and run it, with the output shown in a console. Your code is sent to a free online service to be run.
Press Run, or Ctrl or Cmd + Enter, to run your code. The output is shown in Console. Bash runs on a remote server, so it needs a connection, can be busy, and usually answers within a few seconds. It stops after 90 seconds. Input is not available.
Preview
Console
Output appears here. Press Run, then try console.log("Hello")
As with any online tool, we highly recommend not including sensitive data in your code, such as passwords, API keys or other secrets.
How to use
Write your Bash code in the script.sh tab. Start with #!/bin/bash if you like.
Press Run, or Ctrl or Cmd + Enter. The output appears in the Console panel.
A run usually takes a few seconds, and it is stopped after 90 seconds.
There is no keyboard input, so put your test data in the code.
Copy the code, download your files or clear the editor with the icons above it.
Open the full screen editor for more room, and use the A buttons to resize the text.
Why use this tool
Real Bash
A real Bash shell runs your script, with the usual built-in commands and common tools.
Built-in console
Program output and error messages appear beside the preview.
Nothing to install
Your code is run for you on a remote server.
Comfortable editor
Resize the text, switch line wrapping on or off, or go full screen with the editor and preview side by side.
About this tool
Write Bash code and run it online, with the output shown in a console. Learn variables, loops, functions, arrays and pipes, or check how a command behaves without opening a terminal. Bash cannot run inside a web page, so your code is sent to a free online code-running service that runs it and returns the output. Never paste passwords, API keys or other secrets.
Frequently asked questions
Yes. Bash cannot run in a web page, so this playground sends your code to a free online code-running service that runs it and returns the output. That service receives your code and your IP address, as any website does. Never include passwords, API keys or other secrets. The Go, PHP, Rust, Java, C# and Bash playgrounds all work this way, and each says so on its page.
Bash is a shell, which needs an operating system. Browser emulations are large and limited, so running it on a remote server is the practical way.
A current Bash release on the service. Run bash --version in your script to see it.
The service is free, so it can be busy or unreachable. Check your connection and try again in a moment.
Only what is installed on the service, and the service has no internet access. Scripts that need the network or your files will not work here.
Only what the language includes. Packages and libraries cannot be installed here.
Yes. Untick Wrap long lines under the editor and it scrolls sideways instead. Your choice is remembered on this device.