shell

The program that reads the commands you type, runs them and shows the results; sh and bash are common ones.

In more detail

The shell also runs scripts, which are files of the same commands. It interprets special characters such as *, ! and &, so arguments containing them usually need quoting.

Examples

Quote host patterns such as 'production:!dbservers', because ! and & mean something to the shell.
Distroless images contain no shell at all.
Quote Git format strings so the shell passes them unchanged: git log --format='%h %s'
The shell is an ordinary user space program: it parses your command line, expands variables and starts other programs as child processes. It also provides job control, letting you move commands between the foreground and background. The kernel only sees the processes the shell starts, not the command text you typed.
sh -c 'printf "child finished\n"' asks the shell to start a short child process that prints and exits.
Python's own interactive mode is also called a shell; its prompt is >>>.
Office programs spawning shells is a classic malware indicator.

Related terms

Taught in

References

Certification courses