Bash

Published Dec 28, 2022
Contribute to Docs

The Bourne Again Shell, or Bash, is a Unix-based shell program and language used for a multitude of purposes including system administration and software testing.

Developed by Brian Fox in 1989, Bash was released as part of the GNU Project to replace the original Bourne Shell. It was also one of the first programs ported to Linux.

Operating System Compatibility

Over time, Bash has become available across many operating systems both as a default shell or an installable program.

Linux

Due to their mutual relationship with the GNU Project, Bash is the default shell on most distributions of Linux such as the following:

macOS

Apple macOS featured Bash as the default from 2003 with OS X Panther (version 10.3), to 2019 with Catalina (version 10.15). Since then, Z shell (or zsh) is the default shell for macOS.

Note: Bash can still be used as an alternative in newer versions of macOS. The switch can be made by:

  1. Running chsh -s bin/bash in the Terminal window.
  2. Confirming the change with the user’s credentials.
  3. Closing and reopening the Terminal window.

Windows

Bash is not the default shell for Windows operating systems, but it can be enabled through the Windows Subsystem for Linux (WSL). This runs a Linux environment without the need for a virtual machine.

All contributors

Looking to contribute?

Learn Command Line on Codecademy