What is a shell?
A shell is the program that reads the commands you type and tells the operating system to run them.
Drafted with AI from official documentation. Scripts were run in a test environment and repository links verified. Awaiting a human check. Did it work for you? Last edited Outdated?
A shell is a command interpreter: you type a line of text, it works out which program you mean, runs it, and shows the result. It is the waiter between you and the kitchen that is the operating system. Shells also offer a small programming language with variables, loops and conditions, which is why shell scripts exist.
On Linux and macOS the common shells are bash and zsh; Windows has PowerShell and the older cmd.exe. When you open a terminal window, a shell starts inside it and shows a prompt. Configuration files such as ~/.bashrc or ~/.zshrc run at start and set up aliases and the PATH.
echo $SHELL
for f in *.txt; do echo "$f"; done
See also: What is a terminal? and What is PATH?
Did this work for you?
No votes yet. Be the first.
If it did not work, the report form below tells the editors what went wrong.
See also
- 0049 Pipes and redirection: connecting commands A pipe sends one command's output into another command, and redirection sends output to a file. Together they let small tools build… Beginner · Explains an idea · Linux, macOS Article Basics · Text processing 15 Oct 2026
- 0050 File permissions: chmod, chown and what 755 means Every file has an owner, a group and read/write/execute permissions for three kinds of users. chmod changes the permissions and chown changes… Beginner · Explains an idea · Linux, macOS Article Basics 15 Oct 2026
- 0051 Environment variables and PATH Environment variables are named settings that every program inherits from the shell. PATH is the one that tells the shell where to… Beginner · Explains an idea · Linux, macOS Article Basics 15 Oct 2026
- 0057 Shell cheat sheet: everyday commands A quick reference for moving around, managing files, viewing and searching text, checking processes and disk space in bash and zsh, with… Beginner · Cheat sheet · Linux, macOS Article Basics · Command-line tools 15 Oct 2026
- 0285 What is a terminal? A terminal is the window where you type commands; the shell inside it does the actual work. Beginner · Explains an idea · Any system Article Basics 15 Oct 2026
- 0286 What is PATH? PATH is the list of folders your shell searches to find a program when you type its name. Beginner · Explains an idea · Any system Article Basics 15 Oct 2026
History
Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.
- Dominik +709 chars