dev-tools
Glossary ↗Terminal / Shell
A shell is the program that interprets and executes the commands a developer types, providing the interactive command-line environment most developers work in daily; a terminal (or terminal emulator) is the window/application that displays that shell and handles text input/output. Common shells include Bash and Zsh on macOS/Linux, and PowerShell on Windows; common terminal emulators include the built-in Terminal.app, iTerm2, and Windows Terminal. Beyond running one-off commands, shells support scripting (`.sh` files — sequences of commands saved and re-run), variables, pipes (| operators, sending one command's output into another as input), and control flow, making the shell itself a lightweight programming environment used constantly for automation. Why it matters for AI/SaaS builders: the shell is the substrate every CLI tool, build script, deploy pipeline, and — notably — every terminal-based AI coding agent (including Claude Code) actually runs on top of; fluency with core shell operations (piping, redirection, environment variables, background processes) is what lets a developer (or an AI agent acting through a shell) chain simple tools together into powerful automations rather than needing a dedicated GUI tool for every task. Shell scripting is also frequently the actual implementation layer behind "automated" CI/CD steps — a YAML pipeline definition is often just a sequence of shell commands under the hood. How it works: a shell reads a line of input, parses it into a command and arguments, resolves the command to an executable (searching directories listed in the `PATH` environment variable), forks a new process to run it, and — depending on connecting operators — either waits for it to finish (`;`), runs it only if the previous command succeeded (`&&`), or pipes its output directly into the next command using the pipe operator. Worked example: a developer wants to find all JavaScript files containing a deprecated function call and count them. They chain two commands with a pipe in one line: `grep -rl "oldApiCall(" --include="*.js" . | wc -l`, where `grep -rl` recursively searches for the string and lists matching filenames, and `wc -l` counts those filenames — producing an instant count (say, "7 files") without writing a single line of a general-purpose program, entirely by composing small Unix tools through the shell's piping mechanism. This composability is exactly why AI coding agents operate so effectively through a shell interface: rather than needing a dedicated, purpose-built tool for every possible task, an agent can combine the same small set of general-purpose Unix commands in novel combinations to accomplish almost anything, the same way an experienced developer would.
Related terms