The Shell Between Your Command and the Computer
A shell is a command interpreter: software that reads instructions in a command language and carries them out. It can start other programs, perform its own built-in operations and connect several tasks. The terminal window showing the prompt is the place you interact with it, rather than the interpreter itself.
The distinction is visible in Microsoft's Windows Terminal. That application can host different shells, including Command Prompt and PowerShell. Changing the shell changes the language being interpreted even when the surrounding window stays familiar.
A shell is also separate from the kernel, the operating system's core software for managing resources and handling requests from programs. The shell reads the requested task; the operating system manages the resources used to perform it.
The Bash Bug That Made Ordinary Requests Dangerous
What happens after you press Enter
In a shell following the POSIX standard, the command echo 'hello' displays the word hello. The shell identifies echo as the command and hello as its argument, meaning data passed to that command. The quotation marks tell the shell to preserve the enclosed characters; the marks themselves aren't part of the value it passes along.
A longer command can tell the shell where to send the result or which task to run next. The shell reads those instructions before starting the requested work.
A function is a reusable group of instructions. A command may run one, use an operation built into the shell or launch a separate program. A program launched from a shell isn't thereby part of the shell itself.
The POSIX Shell Command Language standard describes this sequence for shells following its rules. It also describes how the shell receives an exit status, a result indicating how a command finished.
Output needn't always appear on screen. Redirection sends input or output somewhere else, such as a file. A pipeline connects commands so one command's output becomes another's input. Those features let a shell arrange several smaller operations into a larger task.
A script uses the language without waiting at each prompt
A shell script puts instructions in a file for the interpreter to read. The file can name commands, supply their inputs and set conditions for running them, without a person typing each line as it is needed.
That makes repeated tasks possible, but repetition isn't a check on correctness. A mistaken instruction can be repeated just as faithfully as a useful one. Automation removes the need to retype the work, not the need to understand it.
Different shells have different syntax and capabilities. PowerShell, for example, supplies a shell and scripting language on Windows, Linux and macOS. Its pipeline can pass structured objects, collections of named values that the next command can use, rather than only streams of text. Microsoft's PowerShell overview explains that design.
A command written for one shell therefore shouldn't be assumed to have the same meaning in another. “Run it in a terminal” leaves out which interpreter will actually read it.
- Stop breaking your focus to look up a command: the answer is already under your wrist.
- Find what you need fast, with commands grouped by job from files to networking.
- Enough room for a laptop or a keyboard and mouse, on a soft surface that's easy on your wrists.
Some characters are instructions too
Command languages give certain characters special meaning. Quoting controls which characters retain their special meaning and which are treated as ordinary data. The exact rules belong to the particular shell language.
This is why text passed to a shell needs care. Something intended as a filename or other value can be misinterpreted if the program constructing the command fails to preserve that distinction. The problem is about which text becomes an instruction, not whether the text looks technical to a human reader.
Unix: A Family History, a Standard and a Set of Permissions

What the $!$*$@ … Bash Shell Variables

Steve Bourne: The Man Who Turned a Command Prompt Into a Language

QUOTE:
"Amateurs hack systems, professionals hack people."
