What is Bash? Shells and terminals
What is Bash?
Bash (Bourne Again SHell) is a command interpreter and a scripting language. It reads commands and carries them out, either using its own built-in commands or starting other programs. A terminal is the interface through which you can type commands and read their output. The operating system provides the resources and services that programs use.
Find out whether Bash is available
Open a terminal on a system with GNU Bash installed (for Windows learners, a configured WSL Linux environment is one option). Enter the command below, without typing the prompt symbol that may already appear on screen. It asks the Bash executable for its version. If the command is unavailable, use your operating system’s trusted package or setup documentation; you do not need administrator access for these lessons once Bash is installed.
Expected output excerpt (full text varies by version):
GNU bash, versionThe first line includes the version and often build/platform information. The examples in this chapter were checked on Bash 5.2.37 on Debian 13. Your version can differ. This command checks the executable named bash, not which shell currently interprets your terminal input.
Interactive and script execution
In an interactive Bash session, the shell usually waits for input after displaying a prompt. A noninteractive Bash process can read commands from a script or a supplied command string without displaying a prompt. To enter a Bash session from another shell, type bash; to return, type exit in that nested session. Do not close your original session by mistake.
Expected output when executed:
Bash is runningHere -c tells Bash to execute the following command string. The inner printf prints a line; the next lesson explains its arguments. This is a small noninteractive process, not a new terminal window.
Common misconception
Opening a terminal does not guarantee that Bash is your active shell. A terminal may host zsh, fish, PowerShell or another interpreter. Conversely, a Bash script can run without a visible terminal. Start Bash explicitly when practicing Bash-specific syntax.
Practice
Identify the terminal, shell and operating system in your own environment. Run the version check, then explain what it does and does not prove.
Next lesson: Your first Bash command