Linux Unix Command: bash

The Bash shell is a common, default command-line interpreter for Linux

man using laptop in an open office

Robert Daly / Getty Images

Bash is a shell environment within Linux. Running bash within a Linux shell session invokes a fresh session of the bash interpreter.

Unix Shells

swapping shells in linux

Bash—the Bourne Again Shell—provides a standard toolkit for interacting with the computer from a command-line environment. Many desktop-grade Linux distributions use Bash as the default shell, but it's not the only one. For example, the popular Z Shell (usually called zsh) offers a slightly different look-and-feel.

From any terminal window, you can switch shells simply by invoking them. To change from Zsh to Bash, just type bash.

To check which shell you're in, type echo $0.

To close a shell session, type exit. Exiting the initial spawned shell for your terminal window will usually close the terminal application altogether.