Glossary

Exit code

The number a command returns: 0 means success.

Every process ends by reporting a status number to its parent. Zero means success; anything else signals a failure, with specific values meaning specific things per program. The shell exposes the last one as $?.

This tiny convention is how independent programs coordinate: && runs the next command only on success, || only on failure, and if statements in scripts branch on it. Well-behaved scripts exit 1 on error so that they compose too.

See it in practice

$ grep -q root /etc/passwd && echo found || echo missing

grep prints nothing (-q) and communicates purely through its exit code, which && and || branch on.

Where you'll meet it

Bash scripting for beginners

In-depth guide

Signal

An asynchronous message sent to a process, like SIGTERM or SIGKILL.

diff

See exactly what changed between two files or trees — the language of patches.

Learn these concepts by typing them: the interactive course builds them up lesson by lesson in a real simulated shell.