Questions about bash only, as opposed to other Bourne/POSIX shells. For all Bourne/POSIX-style shells, use the /shell tag instead.

Bash (the Bourne again shell) is a Unix shell. It was intended as a free replacement to the Bourne shell and includes many scripting features from ksh and interactive features from (t)csh. Bash, when called as sh is intended to conform to the POSIX 1003.2 standard.

Bash also includes more advanced interactive features such as command line editing with the library, command history, job control, dynamic prompts and completion.

Bash is the default interactive shell on most Linux distributions and is usually available on other unix variants. Some GNU/Linux systems even use it as the default scripting shell /bin/sh while others use a smaller but more efficient shell.

Use the tag if your question is about Bash programming constructs or about interactive use of Bash. Use the tag instead if your question is about a sh (Bourne or POSIX) script. Before asking for help about problems with bash scripts and shell operands, consider debugging the script yourself first.

Links and documentation

Related tags

  • Many shell-agnostic questions are of interest to bash users.
  • (or globbing): matching files based on their name
  • a history of commands that can be navigated with the Up and Down keys, searched, etc.; also a recall mechanism based on expanding sequences beginning with !.
  • completion of partially-entered file names, command names, options and other arguments.
  • showing a prompt before each command, which many users like to configure.
  • the GNU library implementing the line editing and history handling in bash (and other terminal applications like gdb, python...)
  • used to define shortcuts for frequently used commands.

Frequently Asked Questions

Further reading

Books and Resources

history | excerpt history

Code Language (used for syntax highlighting): lang-bsh