Which shell variable is exit code of last command?
Multiple choice — select one answer
Answer choices
Architectural breakdown & explanation
$? holds last command return status.
Correct answer(s): a. $?
Exam domain: Domain 3: Scripting, Containers, and Automation (29% weight on the official guide).
Official documentation & study links
Practice this certification
This page is one question from the CompTIA Linux+ bank. Run a full timed practice exam with domain-weighted random questions in your browser.