exit status
The number a command leaves behind when it finishes, readable as $?: 0 for success, anything else for a failure the program chose to report. It tells you whether the program ran to the end, not whether it did what you wanted, and the two come apart in both directions. cp index.html ~/backup/2026-08-08 with no such directory writes a file wearing the name of the directory you wanted, silently, exit status 0. A reversed scp alice@203.0.113.10:app/config.yml ./config.yml downloads over your evening's work, exit status 0. find /var/log -delete -name '*.log' deletes the whole tree because -delete is evaluated first, exit status 0. The other way round, diff -u exits 1 whenever the files differ: a script that reads any non-zero status as breakage stops on a command that worked.
Also written: return code, exit code, $?
