Show exit status of previous command.
Section: Shell Basics
Print previous exit status
bash
bash
echo $?Explanation
A zero status means success by convention.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Shell Basics