Questions specific to GNU’s Bourne Again SHell, as opposed to other Bourne/POSIX shells. For questions about Unix shells in general, use the /shell tag instead. For shell scripts with errors/syntax errors, please check them with the shellcheck program (or in the web shellcheck server at https://shellcheck.net) before posting here.

Bash (the GNU Bourne Again SHell) is a Unix shell. It was built as a free replacement to the Bourne shell and includes many scripting features from other shells, such as ksh and (t)csh. When called as sh, it is intended to conform to the POSIX 1003.1 standard. Bash features include: command line editing with the readline library, command history, job control, functions & aliases, arrays, dynamic prompts, integer arithmetic, and command & filename 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 shell /bin/sh.

Because Bash is a common shell, you may be using it by default, so beware the temptation to choose this tag by default! Use only if your question is about Bash-specific syntax or the interactive use of Bash. Use the tag instead if your question is about a sh (Bourne or POSIX) script. Use if you have a question about a shell’s interaction with other programs.

Before asking for help about problems with Bash scripts, consider debugging the script yourself first.

Related tags

  • Many shell-agnostic questions are of interest to Bash users.
  • For questions about shell scripting in general

Other shells

  • - the Korn shell
  • - the C shell
  • - the TENEX C shell
  • - the Z shell
  • - the Debian Almquist shell
  • - the friendly interactive shell

Features related to Bash

  • (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 customize
  • the GNU library implementing the line editing and history handling in Bash (and other terminal applications like gdb and python)
  • for defining shortcuts for frequently-used commands
  • a data structure for storing items in index-able memory

Bash reference material

Sampling of Bash-related Unix.SE questions:

Books and other resources

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