Skip to main content

Side by side

TerminalvsShell

What is the difference between a terminal and a shell?

Updated 2 min read6 differences

In short

A terminal is the program that shows a text interface and passes on your keystrokes, while the shell runs inside it, reading your commands and executing them.

Terminal

A terminal is the program that shows a text interface, passing your keystrokes to a shell or command-line program and displaying the text it sends back.

Read the page on Terminal

Shell

A shell is a program that reads commands typed by a user or written in a script and asks the operating system to run them, usually through a text interface.

Read the page on Shell

Terminal and Shell compared

AspectTerminalShell
What it isA program that displays text and takes inputA command interpreter
Main jobShow output, send keystrokesRun commands and scripts
ExamplesWindows Terminal, iTerm2, GNOME TerminalBash, zsh, fish, PowerShell
Configured inThe terminal's settings: fonts, colors, tabsFiles such as .bashrc and .zshrc
ScriptingNoYes
Can be swappedYes, keeping the same shellYes, inside the same terminal

The difference, explained

When you open Windows Terminal, iTerm2 or GNOME Terminal, you see a window of text. That window is the terminal, today a terminal emulator imitating the hardware terminals of the past. It draws characters, handles colors and fonts, and sends whatever you type to the program connected to it.

That program is usually a shell, such as Bash, zsh, fish or PowerShell. The shell shows the prompt, reads the line you type, expands variables and wildcards, runs the programs you name, connects them with pipes and returns their output to the terminal to display. It is also a scripting language for automating tasks.

Because they are separate, you can mix them freely: the same terminal can run Bash in one tab, PowerShell in another and an SSH session to a remote server's shell in a third, and the same shell works in any terminal. Settings are separate too: fonts and colors belong to the terminal, aliases and the prompt to the shell's configuration file, such as .bashrc or .zshrc.

A common misconception is that the terminal, the shell, the console and the command line are all one thing. In everyday speech they are used loosely, but knowing which layer does what helps when something breaks: garbled colors point to the terminal, a command not found points to the shell or the PATH.

Which one should you use?

Choose Terminal when…

  • You want to change fonts, colors, tabs or split panes.
  • Text rendering, copy and paste or key handling misbehave.
  • You want a faster or more featureful window for the command line.

Choose Shell when…

  • You want to change the prompt, aliases or command completion.
  • You write scripts to automate tasks.
  • A command isn't found or behaves differently than expected.

Readers ask

Is Bash a terminal?

No, Bash is a shell. It runs inside a terminal, which displays its prompt and output.

What is the difference between a console and a terminal?

Today they are mostly synonyms. Historically, the console was the main terminal attached directly to a machine.

What is the command line?

The general way of working by typing commands, made of a terminal and a shell together. A CLI is the text interface of a specific program, such as git.

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings