Skip to main content

Bourne-Again SHell. sh-compatible command line interpreter.

# To start an interactive shell session:
bash

# To start an interactive shell session without loading startup configs:
bash --norc

# To execute specific [c]ommands:
bash -c "<echo 'bash is executed'>"

# To execute a specific script:
bash <path/to/script.sh>

# To execute a specific script while printing each command before executing it:
bash -x <path/to/script.sh>

# To execute a specific script and stop at the first [e]rror:
bash -e <path/to/script.sh>

# To execute specific commands from stdin:
<echo "echo 'bash is executed'"> | bash