Terminal, Console, Shell, CLI = What the heck?

CLI

Command line interface (CLI) is one of the way to communicate with computer. The other most popular way in use today is Graphical user interface (GUI).

Terminal

Terminal is the program that uses command line interface (CLI) to collect user input (from input device), pass it on to computer's operating system, receives the response back and display it on output device.

Console

Console is the hardware device with a screen and keyboard combined inside it. Console runs a terminal program to interact with computer system.

console.png

Virtual Terminal

As time passed on, hardware consoles were replaced with personal computers and CLI based terminal programs were replaced with Graphical user interface (GUI) to provide an easy way to interact with computer system.

However there are times when we need to use CLI based terminal programs to interact with computer system. For this reason or more, modern operating systems provides virtual terminal (terminal emulator program) as a way to interact with computer through command line interface (CLI).

The reason why we call them virtual terminal is because they are hosted inside GUI environment (Windows, Mac...)The job of a virtual terminal is same as of real terminal, i.e. collect user input, send it computer system, receives the response back and display it to user.

A virtual terminal is also called as software console or simply console. Any program that runs inside the virtual terminal is called as console application. In Microsoft Windows when user runs the cmd.exe, it opens a new window, this new window is called terminal or console. Terminal provides certain features like copy, paste, font size, colors etc.

Besides virtual terminal, there are many other consoles available, for example modern browsers provides a built in console, Development Environments like Visual Studio Code provides a built in console, etc. The common denominator is that all console applications uses the command line interface (CLI) to interact with user.

Shell

A shell is a software program that runs inside a virtual terminal or console. It receives the commands from user through terminal, process them and send the result back to terminal. For example in Windows we have two shell programs available, Command Prompt (CMD) and Power Shell.

Command prompt (CMD) accepts DOS commands where as Power shell accepts power shell script commands as well as DOS commands. Therefore power shell is a super set of command prompt. There are many other shell programs available like bash (comes with Unix).

Multi Console Terminal

Until now, a terminal in Windows could only runs a single shell program. Microsoft released a new version of Windows Terminal (available free for Windows 10) that can run multiple shell programs inside it.