Yes and no! (Although, in the present day, we do use them interchangeably with the confidence that the other person knows what we're talking about)
I get these terms mixed up quite a bit, so I wanted to dive deeper into what they are, why we use them interchangeably, and what the true differences are (at least the ones that matter).
What is a Terminal?
At it's core, any input/output device. Our keyboards and mice are terminals. So are our ears and eyes. They are like terminals for sound.
What is a console?
A physical terminal; a physical mechanism by which input can be collected. Thinking about it this way, it's easy to see how we share this word across industries: video game consoles in gaming, mixing consoles in music, and command consoles in aviation/space.
What is a CLI?
CLI stands for Command Line Interface. A CLI is a distinct type of interface that accepts input commands and then executes them once you hit the Return/Enter key.
What is a shell?
A shell is a specialized command line interface; this is what actually recognizes the commands you enter and then tells the operating system to execute them. There are many flavors; cmd is the default shell on Windows, Bash is the default shell on most Linux distributions, and just recently, zsh became the default shell on macOS Catalina.
My mind's blown. Is yours? Mooncake's definitely is.
Terminal, Console, CLI, and shell: The (Quick!) History Behind the Words
Yes, in order to understand why these terms have morphed into an interchangeable mess, we need to go back to the beginning. Back to the days of mainframes...
IBM 360 Mainframe - From Women and Technology Project
You've probably seen pictures of these things. They took up entire rooms. And they were usually found in large businesses or universities. In fact, I think my college still uses one (because if it still works, why replace it?!).
Mainframes were meant to be used among many different users. Today, we would achieve this by just handing everyone their own personal monitor, keyboard, and mouse. But back then, users shared access through a common endpoint: the terminal. These were specialized stations that had a display (usually a small cathode ray tube TV screen) and a built-in keyboard. They were connected to the mainframe by a cable or phone line.
Woman sitting at a terminal - From Women and Technology Project
Speaking of connections, we get the term console from the actual console port on the mainframe that terminals would connect to. This is how users controlled the mainframe digitally, through these connected terminals scattered around the building.
Ok, so now we're connected. How did users actually interact with the mainframe? If you have seen any "hacker" scene in a movie, you usually see something like this:
(And if you have a minute and 47 seconds to spare, watch this hilarious Ode to Mainframes 😂)
Notice how there are no fancy graphical interfaces just yet? That's because most interactions with mainframes were via simple commands, entered one at a time. And this is where the term and concept of the command line interface (CLI) comes from! Users would supply a command to the mainframe through a terminal.
Alright, home stretch...
It's important to note that the terminal has nothing to do with the actual processing or interpreting of the command. They are simply a means for the user to input commands (hence the hopefully antiquated term "dumb terminal"). It's actually the shell that accepts and recognizes these commands, sends them to the mainframe to execute, collects the results, and sends it back to the terminal!
Here's the kicker: the shell is really just a wrapper around the kernel. And in an operating system, the kernel is "a computer program that is the core of a computer's operating system, with complete control over everything in the system. On most systems, it is one of the first programs loaded on start-up..."
This is why we call the shell a "shell" as it acts similarly to the piece of material around a corn kernel!
Today, most terminals and consoles are represented virtually through software, but as we've learned, they used to be physical, tangible objects. Pairing this history with the fact that they are heavily intertwined with the origins of the command line interface, it's easy to see how the terms "terminal" and "console" have become muddled together! And by the time we reach present day, the use of all of these terms "terminal", "console", "shell", "CLI" eventually became synonymous with the end goal we as developers are trying to achieve: to interact with an operating system and execute specific actions through commands!