bash
ShellFundamentals In simulator In real LinuxThe Bash shell; also runs scripts
Name: bash = Bourne-Again SHell (a pun on the Bourne shell)
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
bash is the GNU project's shell and the default on most Linux distributions. It is compatible with the classic Bourne shell (sh) and adds history, Tab completion, arrays, [[ ]] and more.
It is both the interactive environment you type into and the interpreter that runs shell scripts.
Syntax
bash [OPTION]... [FILE]Common options
| -c | Run a command string |
| -x | Print each command as it runs (debugging) |
| -n | Check syntax without running |
| -e | Stop at the first failing command (set -e in scripts) |
| -u | An unset variable is an error |
| -o pipefail | A pipeline fails if any command in it fails |
| -v | Print each line as it is read (for debugging) |
| -l / --login | Start as a login shell (reads /etc/profile and ~/.bash_profile) |
| --norc | Do not read ~/.bashrc |