Skip to content
BENIBIX Learn

Shell

Infrastructure⌨️ Linux & the Command LineCommand Line

Also known as Command Shell, Bash, Zsh, Unix Shell

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

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.

Example

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

Why it matters

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

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 code

console
$ echo $SHELL
/bin/bash
Ask which shell you are in. This one is Bash.

Common mistake

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

Key takeaways

  1. 1
    Reads and runs. Your typed commands.
  2. 2
    Chains and scripts. Joins commands together.
  3. 3
    Inside the terminal. The window is separate.

Compare

Learn it properly