What Is Bash?

Topics · Published 2019-06-15 · Revised 2026-11-23
Reviewed corrections applied locally; pre-review version preserved separately · Joomla source

6,183 Total views across this article’s versions; includes the historical baseline where available.

Original article image: What is BaSH?

Often written as “Bash” or “BASH”, BaSH is an acronym for “Bourne Again SHell.” BaSH is a UNIX shell programming language interpreter that comes preinstalled with many UNIX and Linux based operating systems, including Ubuntu.

Why Use Bash?

Bash is free software distributed under the GNU General Public License. It is the GNU project’s shell: a program that interprets commands, runs other programs, and supports interactive work and scripts. The GNU introduction describes its relationship to the Bourne shell and features borrowed from other shells.

Bash is Turing complete. With an idealized unlimited supply of time and memory, it can express any computable algorithm. That does not mean every mathematical problem is computable, or that a shell script is a practical choice for every workload.

Popularity

Bash adds programming and interactive features to the Bourne-shell tradition. Many sh scripts run under Bash, but portable scripts still need to follow the targeted shell standard and avoid assumptions about a particular interpreter or its configuration.

Shells have long histories, but they are maintained software. Bash releases include new features, bug fixes, and behavior changes. The 2019 version discussion below is historical; it is not a current popularity survey or evidence that shells rarely need updates.

POSIX Compliance

POSIX (Portable Operating System Interface) specifies interfaces and behavior intended to make applications portable between operating systems. It includes a shell command language and common utilities; it does not propose replacing every UNIX-like system with one operating system. See the Open Group's overview.

Some default Bash behavior differs from POSIX. Starting Bash with --posix, or running set -o posix inside Bash, changes those behaviors toward the standard. The GNU POSIX-mode documentation also lists qualifications and additional settings. Enabling the mode is not a certificate for the whole operating system, nor proof that a script is portable: Bash extensions can still be used, and external utilities have their own requirements.

Brief History

Brian Fox wrote Bash for the GNU project. His June 1989 beta announcement describes version 0.99 as a Bourne-compatible shell with interactive editing, completion, history, aliases, and functions. Bash subsequently continued to develop as both an interactive shell and a scripting language.

The GNU introduction identifies the Bourne shell as its foundation and notes features from KornShell (ksh) and the C shell (csh). Those relationships explain similarities; they do not make scripts for all three shells interchangeable.

Bash Versions

This article originally discussed the transition from Bash 4.x to 5.0 in 2019. Bash 5.0 was announced on January 7, 2019. Alongside fixes, it introduced features such as EPOCHSECONDS and EPOCHREALTIME; it also changed some behavior, including nameref resolution. It was more than a collection of insignificant fixes.

This is not a measured version survey. For a script, check the interpreter actually being used and its required features. For maintenance, follow the operating system’s supported packages and applicable updates rather than assuming an old shell remains suitable because familiar commands still work.

To display the version of the Bash executable found through the current command search path:

bash --version

This does not establish which interpreter ran another script or whether a distribution has backported a particular fix.

Z-Shell: Bash on Steroids?

Zsh is a separate shell, not a newer version of Bash. Its manual describes a command interpreter with its own behavior and compatibility limits. Choosing it for interactive use does not automatically make existing Bash scripts compatible.

Zsh’s completion system depends on initialization and configuration. Suggestions appearing while you type can also come from an added component such as zsh-autosuggestions, which uses history and completions. Those plugin-driven suggestions should not be promised as the default behavior of every zsh installation.

References

Bourne shell. (12 December 2018). Wikipedia. Wikipedia Foundation. Bourne shell

GNU Bash. (15 December 2017). Free Software Foundation. GNU Bash

POSIX. Wikipedia. (25 June 2019). Wikipedia Foundation. POSIX

Turing Completeness. (15 June 2019). Wikipedia. Turing completeness

Additional primary sources for the reviewed technical explanations:

GNU Bash introduction; GNU POSIX mode; POSIX and the Single UNIX Specification; 1989 beta announcement; Bash 5.0 release announcement; zsh manual; zsh completion; zsh-autosuggestions.