
Shell
The shell is a program that takes typed commands and passes them on to the operating system. It is the text-based alternative to operating a computer with a mouse and windows, and the standard tool of developers, server administrators, and increasingly also of AI agents.
Normally, one operates a computer with the mouse: clicking on icons, dragging files into folders, opening windows. But there is a second way. One types a command as text and presses Enter. The program that receives and executes this text is called a shell. The name comes from the idea of a shell or husk: the shell lies like a shell around the innermost part of the operating system and mediates between it and the human. Instead of clicking on a folder, one types, for example, “cd Pictures”, and finds oneself in the folder “Pictures”.
Why professionals prefer typing to clicking
At first glance, this looks like a step back to the time before windows. But the decisive advantage is: a command is text, and text can be saved, copied, and repeated. One can write a hundred commands into a file and have that file run automatically every morning at six o’clock. A sequence of mouse clicks cannot be done this way without further ado.
Then there is reach. Servers in data centers often have no screen at all and no graphical interface, because that would only cost computing power. Anyone connecting to such a machine from outside gets exactly one thing: a shell. Everything to do with running large websites, databases, or AI training runs therefore practically always happens via typed commands.
A third point is precision. A command describes exactly what should happen, and can be read back later. If a colleague asks how a bug was fixed, one can simply send them the three lines. A description like “then click the gear icon in the top right” quickly becomes outdated as soon as the interface changes.
From the typed word to the running program
The shell works in a loop. It displays a prompt, waits for a line of text, parses this line, and executes it. Afterwards it shows the result and waits again. When parsing, the rule is: the first word is the name of the program, all further words are additional specifications, so-called arguments. In “cp letter.txt backup.txt”, “cp” is the copy program, and the two file names tell it what should be copied where.
The shell becomes truly powerful through chaining. With the character “|”, the so-called pipe, one feeds the output of one program directly as the input of the next. This turns several small tools into a chain, similar to a factory where each station passes on an intermediate product. One program searches for files, the next filters the hits, the third counts them. None of these programs needs to know about the others.
Shell is a collective term here, not a single product. On Linux and macOS, Bash and Zsh are common, on Windows it’s PowerShell. They differ in the notation of some commands, but follow the same principle. The shell is often confused with the terminal: the terminal is just the window that displays the text. The shell is the program that runs inside it and does the work.
Shell access as a key topic for AI agents
In everyday life, most people rarely encounter the shell directly. It becomes visible as soon as one learns to program: in many languages, software is installed with a typed command, and Git, the standard tool for version control of program code, is also usually operated this way. Anyone following tutorials on the internet often copies lines that belong exactly there.
In tech news, the term currently appears above all in connection with AI agents. This refers to AI systems that don’t just answer, but carry out tasks themselves. And exactly for that, they are given access to a shell. The model writes commands, the shell executes them, and the result flows back into the model. This way an AI can test program code, restructure files, or install software.
This also explains why security concerns are taken so seriously here. A shell knows no follow-up questions like “Are you sure?” — it executes whatever is written. One wrong delete command can empty an entire directory in seconds. That is why agents usually run in a sandbox, i.e. an isolated environment, in which a mistake causes no damage to the actual system.