Lumen

Terminal vs shell

The terminal is the window. The shell is the program inside it that runs your commands.

Updated

The difference between a terminal and a shell is simple once you see it. The terminal (strictly, a terminal emulator) is the app that draws text and takes your keystrokes: macOS Terminal, GNOME Terminal, Ghostty, Lumen. The shell is the program running inside it that reads what you type, runs commands and prints results: bash, zsh, fish. You can swap either one without changing the other.

Terminal vs shell at a glance

TerminalShellConsole
What it isAn app that shows text and sends keystrokesA program that interprets commandsThe system's primary text terminal
ExamplesmacOS Terminal, GNOME Terminal, iTerm2, kitty, Lumenbash, zsh, fish, PowerShellLinux virtual consoles (Ctrl+Alt+F3), a server's serial console
ControlsFonts, colours, tabs, splits, scrollback, copy and pastePrompt, aliases, history, completion, scriptingBoot messages, emergency login
Config fileIts own, e.g. ~/.config/lumen/config.toml~/.bashrc, ~/.zshrc, ~/.config/fish/config.fishKernel and system settings

What the terminal does

The terminal handles everything about presentation and input. It picks the font and colours, turns escape codes into bold text or a moving cursor, keeps scrollback, and lets you select, copy and paste. It also decides how many tabs and panes you have. It knows nothing about cd or git; it just passes bytes back and forth through a pseudo-terminal. Our guide to what a terminal emulator is explains that plumbing and where the name comes from.

What the shell does

The shell is a command interpreter. It prints the prompt, reads your line, expands wildcards and variables, finds the program, runs it, and shows you the exit status. It also gives you history, tab completion, aliases, pipes (|), redirection (>) and a scripting language. Common shells:

  • bash: the long-time default on Linux, and what most scripts assume.
  • zsh: the default on macOS since Catalina, popular with frameworks like Oh My Zsh.
  • fish: friendly defaults, autosuggestions and syntax highlighting out of the box, but not POSIX-compatible.
  • PowerShell: Microsoft's object-based shell, also available on Linux and macOS.

Run echo $SHELL to see your login shell, and chsh -s $(which zsh) (or fish, or bash) to change it.

Terminal vs shell vs console

Console originally meant the physical operator's station of a computer: its own keyboard and screen. On Linux today it usually means the virtual consoles, the full-screen text sessions you reach with Ctrl+Alt+F1 to F6, which the kernel draws itself without a desktop. A server's serial or out-of-band management console is the same idea. A console is a kind of terminal; it runs a shell like any other.

Two more terms you'll see:

  • Command line: the general way of working by typing commands, or the single line you're typing on. Not a specific program.
  • TTY: short for teletypewriter. In Unix it's the device a shell is connected to. Type tty and you'll see something like /dev/pts/3, the pseudo-terminal your terminal app created.

How they fit together

Picture a layer cake. At the bottom is the operating system kernel. Above it, the shell runs as an ordinary program and starts other programs for you. On top, the terminal shows the shell's output and feeds it your keys. When you open a new tab, the terminal creates a new pseudo-terminal and starts a fresh shell in it.

This separation is why you can use zsh in iTerm2 on one machine and fish in GNOME Terminal on another and keep the same habits for each half. It's also why some problems belong to one side: a wrong font or broken colours is a terminal issue; a missing alias or a slow prompt is a shell issue.

Where the line blurs

Some features need both sides to cooperate. Shell integration is the main one: the shell marks where each prompt, command and output begins with escape codes (often called OSC 133), and the terminal uses those marks to let you jump between commands, see which ones failed, or copy a command's output. Our shell integration guide covers it in detail.

Lumen, our terminal, loads this for bash, zsh and fish by itself. Each prompt gets a grey or red mark for success or failure, Ctrl+Shift+Up and Down (Cmd+Shift+Up/Down on macOS) jump between commands, Ctrl+Shift+O copies the last command's output, and a long command that finishes while you're elsewhere sends a desktop notification. Your shell config stays yours; Lumen doesn't replace bash, zsh or fish. The shell integration docs explain what it loads.

If you're customising, decide which half you're changing. For fonts, colours and splits, see customising a Linux terminal or customising the Mac terminal. For prompts and aliases, edit your shell's config.

Questions

Is bash a terminal or a shell?

Bash is a shell. It runs inside a terminal such as GNOME Terminal, macOS Terminal or Lumen, which shows its output.

What is the difference between terminal, shell and console?

The terminal is the window that shows text, the shell is the program that runs your commands, and the console is the system's primary text terminal, such as Linux's Ctrl+Alt+F3 text sessions.

Is zsh a terminal?

No, zsh is a shell, the default on macOS. You can run it in any terminal app, including Terminal, iTerm2, Ghostty or Lumen.

Can I change my shell without changing my terminal?

Yes. Run chsh -s $(which fish) (or zsh, or bash) and open a new tab. Your terminal's fonts, colours and settings stay the same.

Try Lumen

Free and open source, for Linux and macOS. Copy the command for your system and paste it into a terminal.

curl -fsSL https://lumenshell.dev/install | sh
brew install --cask lumenshell/tap/lumen