Running echo $? after a command will print the exit status of the last run command.
echo $?
0 is the standard exit code for success. Non-zero represents a failure. Most commonly 1 is used.
0
1
[[shell]]