Terminal
- Pronunciation
- TUR-muh-nul
In short
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.
What is a terminal?
Originally a terminal was hardware: a keyboard and screen, or earlier a teleprinter, connected to a shared computer. Devices such as the DEC VT100, introduced in 1978, defined the escape codes for moving the cursor and changing colors that terminals still understand. Today's terminals are terminal emulators, programs that imitate that hardware in a window.
When you open a terminal, it starts a shell, such as Bash, zsh or PowerShell, connected through a pseudo-terminal. You type, the terminal sends the characters to the shell, the shell runs commands, and the terminal draws their output, interpreting escape codes for colors, bold text and cursor movement. Full-screen programs such as Vim or htop work by sending lots of these codes.
Modern terminals add tabs, split panes, search, GPU-accelerated rendering, clickable links and themes. Popular choices include Windows Terminal, the macOS Terminal and iTerm2, GNOME Terminal and Konsole on Linux, and cross-platform ones such as Alacritty, WezTerm and Ghostty. Code editors such as VS Code include an integrated terminal too.
A common misconception is that the terminal runs your commands. It only displays text and forwards input; the shell inside it interprets and runs the commands. That is why you can use the same shell in different terminals, or the same terminal with a different shell.
Key takeaways
- A terminal displays a text interface and forwards your keystrokes.
- Early terminals were hardware; today's are terminal emulators.
- It starts a shell, which actually runs the commands.
- Escape codes control colors, cursor movement and full-screen apps.
- Windows Terminal, iTerm2 and GNOME Terminal are common emulators.
Readers ask
What is the difference between a terminal and a shell?
The terminal is the window that shows text and takes your typing. The shell is the program inside it that reads your commands and runs them. Bash, zsh and PowerShell are shells; Windows Terminal and iTerm2 are terminals.
What is the difference between a terminal and a console?
Today they are mostly used as synonyms. Historically, the console was the main physical terminal attached directly to a machine, and on Linux the term still refers to the system's text consoles.
What does TTY mean?
Teletypewriter. In Unix it names terminal devices, including the pseudo-terminals that terminal emulators use. The tty command prints which one your shell is connected to.
Often compared
See also
- ShellOperating Systems, p. 27A 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.
- Command Line InterfaceOperating Systems, p. 2A command line interface (CLI) is a text-based way of using a computer: you type a command with options and arguments, press Enter, and read its output.
- BashProgramming Languages, p. 2Bash is a Unix shell and scripting language, the default on most Linux systems, used both to type commands interactively and to automate tasks with scripts.
- PowerShellProgramming Languages, p. 24PowerShell is Microsoft's command-line shell and scripting language for automating administration, passing objects rather than plain text between commands.
- SSHNetworking, p. 28SSH is a cryptographic network protocol for securely logging in to and running commands on remote computers, encrypting all traffic between the two machines.
- LinuxDevOps & Cloud, p. 33Linux is an open-source operating system kernel that powers most servers, cloud platforms, containers, and Android phones, usually packaged as a distribution.
Spotted a mistake or something missing on this page?Suggest an edit