# Shell

> The program that reads the commands you type and runs them.

**Field:** Infrastructure  
**Category:** Linux & the Command Line  
**Also known as:** Command Shell, Bash, Zsh, Unix Shell

## Think of it like

Think of it like a waiter. You give your order, it takes it to the kitchen, and it brings back the food.

## Definition

A shell is the program that reads the commands you type and runs them. It finds the right program, starts it and shows you what it printed. It also lets you chain commands, save values in variables and write scripts. Bash and Zsh are the most common shells on Linux and Mac. The terminal is the window, and the shell is the program inside it.

## Example

Lucy asks her computer which shell it uses. The reply /bin/bash means Lucy is in Bash.

## Example code

```console
$ echo $SHELL
/bin/bash
```

Ask which shell you are in. This one is Bash.

## Why it matters

Every command you type goes through the shell. Knowing it lets you automate boring work.

## Common mistake

Copying a script written for one shell into another. Bash and Zsh differ in small ways that break things.

## Three principles

- **Reads and runs.** Your typed commands.
- **Chains and scripts.** Joins commands together.
- **Inside the terminal.** The window is separate.

## Related terms

- [Terminal](https://learn.benibix.com/term/infrastructure/terminal)
- [Command Line](https://learn.benibix.com/term/infrastructure/command-line)
- [Environment Variable](https://learn.benibix.com/term/infrastructure/environment-variable)
- [Unix](https://learn.benibix.com/term/development/unix)
- [Linux](https://learn.benibix.com/term/development/linux)
- [Shell Script](https://learn.benibix.com/term/development/shell-script)

## Told apart from

- [Terminal vs Shell](https://learn.benibix.com/compare/terminal-vs-shell): People say terminal and shell as if they were one thing. The terminal is the window you type in. The shell is the program inside it that reads your command and runs it.

## Taught in

- [Terminal and Shell Basics](https://learn.benibix.com/learn/infrastructure-linux/terminal-and-shell-basics): Linux CLI, 1/10

---

Source: https://learn.benibix.com/term/infrastructure/shell
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
