Bash (Unix shell)
Bash, short for Bourne-Again SHell, is a shell program and command language supported by the Free Software Foundation[2] and first developed for the GNU Project[3] by Brian Fox.[4] Designed as a 100%[5] free software alternative for the Bourne shell,[6][7][8] it was initially released in 1989.[9] Its moniker is a play on words, referencing both its predecessor, the Bourne shell,[10] and the concept of rebirth.[11][12]
Original author(s)
Chet Ramey
8 June 1989
- BeOS
- Haiku
- macOS ( GPL-2.0-or-later ; GPL-3.0-or-later through 3rd parties)
- Unix-like
- Windows ( GPL-3.0-or-later )
Multilingual (gettext)
Since 4.0: GPL-3.0-or-later,
1.11? to 3.2: GPL-2.0-or-later,
0.99? to 1.05?: GPL-1.0-or-later
Since its inception, Bash has gained widespread adoption and is commonly used as the default login shell for numerous Linux distributions. It holds historical significance as one of the earliest programs ported to Linux by Linus Torvalds, alongside the GNU Compiler (GCC).[13] It is available on nearly all modern operating systems, making it a versatile tool in various computing environments.
As a command processor, Bash operates within a text window where users input commands to execute various tasks. It also supports the execution of commands from files, known as shell scripts, facilitating automation. In keeping with Unix shell conventions, Bash incorporates a rich set of features. The keywords, syntax, dynamically scoped variables and other basic features of the language are all copied from the Bourne shell (`sh`). Other features, e.g., history, are copied from the C shell (`csh`) and the Korn Shell (`ksh`). Bash is a POSIX-compliant shell, but with a number of extensions.
History[edit]
While bash is considered Unix-like,[14] it's also available on MacOS, Windows, BeOS,[15][16] and Haiku.[17]
Brian Fox began coding Bash on January 10, 1988,[18] after Richard Stallman became dissatisfied with the lack of progress being made by a prior developer.[7] Stallman and the FSF considered a free shell that could run existing shell scripts so strategic to a completely free system built from BSD and GNU code that this was one of the few projects they funded themselves, with Fox undertaking the work as an employee of FSF.[7][19] Fox released Bash as a beta, version .99, on June 8, 1989,[9] and remained the primary maintainer until sometime between mid-1992[20] and mid-1994,[21] when he was laid off from FSF[22] and his responsibility was transitioned to another early contributor, Chet Ramey.[23][24][25][26][27]
Since then, Bash has become by far the most popular shell among users of Linux, becoming the default interactive shell on that operating system's various distributions[28][29] and on Apple's macOS releases before Catalina in October 2019.[30][31][32] Bash has also been ported to Microsoft Windows[33][34] and distributed with Cygwin and MinGW, to DOS by the DJGPP project, to Novell NetWare, to OpenVMS by the GNU project,[35] to ArcaOS,[36] and to Android via various terminal emulation applications.
In September 2014, Stéphane Chazelas, a Unix/Linux specialist,[37] discovered a security bug in the program. The bug, first disclosed on September 24, was named Shellshock and assigned the numbers CVE-2014-6271, CVE-2014-6277 and CVE-2014-7169. The bug was regarded as severe, since CGI scripts using Bash could be vulnerable, enabling arbitrary code execution. The bug was related to how Bash passes function definitions to subshells through environment variables.[38]
Vulnerabilities[edit]
A security hole in Bash dating from version 1.03 (August 1989),[86] dubbed Shellshock, was discovered in early September 2014 and quickly led to a range of attacks across the Internet.[87][88][89] Patches to fix the bugs were made available soon after the bugs were identified.
Licensing[edit]
Since 4.0: GPL-3.0-or-later
[90]
1.11? to 3.2: GPL-2.0-or-later
[91]
0.99? to 1.05?: GPL-1.0-or-later
[92]
[51]
[93]