Bash is the GNU Project’s Bourne Again Shell, a command interpreter used for interactive terminal sessions and shell scripting. It implements the Bourne shell language with extensions drawn from the Korn shell and C shell, alongside additional facilities for programming and interactive use.
The shell is widely used to automate tasks involving files, processes and other operating system resources. Scripts can combine external commands with variables, functions, conditional statements and loops. Bash provides facilities for handling command exit statuses, redirecting input and output, and constructing pipelines between programs.
For interactive work, Bash includes command history, programmable completion and command-line editing. Users can recall previous commands, search their history and configure aliases or functions for frequently performed operations. Its built-in line editor supports Emacs and Vi-style keybindings.
Bash provides indexed and associative arrays, arithmetic evaluation and advanced parameter expansion. These facilities allow scripts to manipulate strings and collections of values without relying on separate utilities for every operation.
Although Bash can operate in a POSIX compatibility mode, many of its extensions are not portable to smaller shells such as dash. Scripts intended for a particular shell should therefore use the corresponding interpreter.
This is free and open source software.
Key Features
- Executes interactive commands and shell scripts.
- Supports POSIX shell syntax and numerous Bash extensions.
- Provides variables, functions, aliases and command substitution.
- Supports indexed and associative arrays.
- Offers integer arithmetic and advanced parameter expansion.
- Provides conditional statements, loops and case expressions.
- Supports pipelines and input/output redirection.
- Offers process substitution and here documents.
- Provides foreground and background job control.
- Maintains persistent, searchable command history.
- Supports Emacs and Vi command-line editing modes.
- Provides programmable command and argument completion.
- Supports shell traps for signals and other events.
- Offers configurable prompts and shell options.
- Provides restricted-shell and POSIX compatibility modes.
- Supports debugging through tracing and diagnostic options.
- Cross-platform support – runs on Linux and macOS.
Website: www.gnu.org/software/bash
Support:
Developer: Brian Fox, Chet Ramey and contributors
License: GNU General Public License v3.0
bash is written in C. Learn C with our recommended free books and free tutorials.
Related Software
| Shells | |
|---|---|
| zsh | Advanced and programmable command interpreter |
| Nushell | Adopts the Unix philosophy of shells where pipes connect command together |
| fish | Smart and user-friendly command line shell |
| Xonsh | Python-powered, cross-platform shell language and command prompt |
| bash | sh-compatible command language interpreter |
| Murex | Intuitive, typed and content aware shell |
| PowerShell | Cross-platform automation and configuration framework |
| Elvsh | Expressive programming language and a versatile interactive shell |
| Oils | Billed as an upgrade to bash. Written in Python. |
| DASH | POSIX-compliant implementation of sh that aims to be as small as possible |
| sh | Shell parser, formatter, and interpreter |
| tcsh | C shell with file name completion and command line editing |
| mksh | MirBSD Korn shell |
| ksh | Unix shell which was developed by David Korn at Bell Labs |
| brush | POSIX- and bash compatible shell |
| Rash | Language, library, and shell REPL for Racket. |
| ion | Modern system shell that features a simple, yet powerful, syntax |
| Cicada | Bash-like command environment with scripting and job control |
| Yash | Yet another shell |
| oksh | Portable OpenBSD ks |
| es | Extensible shell with higher-order functio |
| dune | A shell by the beach |
| cosh | Concatenative command-line she |
| Marcel | Modern command environment combining Python with Unix pipelines |
| Hilbish | Highly extensible command environment configured with Lua |
| gsh | POSIX-compatible generative shell |
| arsh | Statically typed scripting language with shell-like features |
| Sushi shell | Bash clone shell implemented in Rust |
| loksh | Linux port of OpenBSD's Korn-compatible command interpreter |
| fortsh | Shell written in Fortran |
| hsh | Slightly different take on your shell |
| ReShell | Modern shell |
| rash | Rudimentary shell |
| Dax | Custom Unix shell implementation |
| cjsh | POSIX-oriented command environment with modern interactive features |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.