Bash (Bourne-Again SHell)

Bash is the shell, or command-language interpreter, for the GNU operating system. As the GNU Bash Reference Manual explains, the name is an acronym for the “Bourne-Again SHell,” a pun on Stephen Bourne, the author of the direct ancestor of the current Unix shell sh. Brian Fox wrote Bash for the Free Software Foundation beginning in 1988, and the first version was released in 1989. It was created so that the GNU system would have a free, freely redistributable shell of its own rather than depending on the proprietary Bourne shell that shipped with commercial Unix.

A shell is the program that sits between the user and the operating system: it reads commands, either typed interactively at a prompt or supplied in a file, and arranges for the operating system to run them. Bash performs the classic Unix work of word splitting, filename expansion (globbing), variable substitution, pipelines, and input/output redirection, and it adds a full programming layer on top, with conditionals, loops, functions, and arithmetic. The same language serves both as an interactive command line and as the basis for shell scripts.

The manual describes Bash as largely compatible with sh while incorporating useful features from the Korn shell (ksh) and the C shell (csh). It is intended to be a conformant implementation of the IEEE POSIX Shell and Tools portion of the IEEE POSIX specification (IEEE Standard 1003.1). This dual heritage is deliberate: scripts written to the POSIX standard run under Bash, while interactive users gain conveniences such as command-line editing, command history, job control, aliases, and programmable completion that go beyond the standard.

Bash is distributed under the GNU General Public License, which is central to its role. Because the license guarantees the freedom to run, study, modify, and redistribute the software, Bash could be adopted without restriction by the many Linux distributions that emerged in the 1990s. It became, and largely remains, the default login and scripting shell across GNU/Linux systems and was for many years the default shell on Apple’s macOS as well, until Apple switched its default to Zsh in 2019, partly to avoid shipping GPL-licensed code.

Maintained today as an active GNU project, Bash continues to receive new releases; major versions have added associative arrays, improved pattern matching, and other features while preserving backward compatibility. Its combination of POSIX conformance, free-software licensing, and ubiquity has made Bash one of the most widely used pieces of software in computing, the lingua franca in which a vast amount of system administration, build automation, and glue code is written.