Skip to content

Glossary: Linux for Developers

$? (last exit code)

Also written: $?

A shell variable holding the exit code of the last command. `echo $?` prints 0 if it worked and another number if it failed.

Where the book teaches it

Related terms

exit code&& and ||