Multiple choice technology operating systems

How to check the exit status of the previous command?

  1. $?
  2. $$
  3. $#
  4. $@
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Unix/Linux shells, the special variable $? holds the exit status/return code of the most recently executed command. A value of 0 typically indicates success, while non-zero values indicate various error conditions. The other options are different special variables.