A command returns command not found. Which set of checks is most appropriate to start troubleshooting?
Command-Line Error Troubleshooting Online Quiz Questions
Use this free practice quiz with 20 questions to review Command-Line Error Troubleshooting, test your knowledge, and prepare for your next test or exam.
You see No such file or directory. Select all checks that are appropriate for diagnosing the problem.
- A
Check the current directory.
- B
Assume the file exists and add
sudo. - C
Check path spelling and capitalization.
- D
Check whether the named file or a parent directory exists.
What status does Bash commonly return when it cannot find a command? Enter the status code only.
When diagnosing Permission denied, check whether you have permission to the target.
Describe a safe, systematic process for troubleshooting a command-line error, including how you would make and verify a correction.
A command reports too many arguments or acts on unexpected extra files. Which explanation is a reasonable troubleshooting lead?
- A
The command necessarily succeeded silently.
- B
The target necessarily lacks execute permission.
- C
An unquoted wildcard or spaces in a path may have split the input into multiple arguments.
- D
The shell necessarily failed to find the command.
A command produces no output. Select all explanations that may be possible, according to the command's behavior.
- A
The command may have succeeded silently.
- B
The command may have found no matches.
- C
The command must have failed.
- D
An explanation may have been sent to standard error.
In Bash, an exit status should always be interpreted as a universal success-or-failure signal, without considering which command produced it.
- A
True
- B
False
If a command appears to produce no output, which output stream may contain an explanation instead of standard output?
With a command not found error, check the command’s and whether it is installed and on the .
A command reports No such file or directory. Which check is most directly relevant?
- A
Add elevated privileges and rerun the command.
- B
Check the current directory, path spelling, capitalization, and whether the file or a parent directory exists.
- C
Use a force option to bypass the error.
- D
Assume the command succeeded silently.
If a command produces no output, it may have succeeded silently; checking its status and documented behavior can help distinguish that from other explanations.
- A
True
- B
False
In Bash, which special parameter expands to the status of the most recently completed command? Enter the parameter exactly.
A command reports Is a directory when given a target. What should you check?
- A
The command is not installed or is misspelled.
- B
The target cannot be read, written, or executed because of its permissions.
- C
The command may expect a file but received a directory, or may need an option to process directories.
- D
A wildcard or space in a path may have split the command into extra arguments.
An exit status always has the same universal meaning for every command, so it can be interpreted without considering which command ran.
- A
True
- B
False
What status does Bash commonly return when it cannot find a command? Enter the integer only.
When troubleshooting a command that might change or delete files, which approach best limits the impact of a mistake?
- A
Inspect or list the target first, then make a limited change and verify the result.
- B
Add
sudo,-f, or recursive deletion as a guess. - C
Make several changes at once so fewer retries are needed.
- D
Delete the target immediately if the error message is unclear.
A command reports too many arguments or unexpectedly processes extra files. Which issue should you check?
- A
The command completed silently and sent a message to standard error.
- B
The target directory does not exist.
- C
The target's permissions prevent the operation.
- D
An unquoted wildcard expanded, or spaces in a path split it into multiple arguments.
A shell reports command not found. Which checks are the most relevant first steps?
- A
Add
sudoand repeat the command. - B
Check the spelling, installation, and command search path.
- C
Change the current directory to the command's parent directory.
- D
Quote every argument and retry without inspecting the command.
A command reports Permission denied for a target. What is the best initial response?
- A
Assume the file is missing and recreate it.
- B
Use a force option to bypass the restriction.
- C
Check the relevant access permissions before deciding what to do.
- D
Recursively delete the target and try again.
Related study packs and tools
3 Airway, Respiration, and Ventilation
Review EMT airway assessment, breathing mechanics, airway management, ventilation support, and priorities for common respiratory emergencies.
3 Airway, Respiration, and Ventilation
Learn how to assess airway and breathing, distinguish ventilation from oxygenation and respiration, provide appropriate support, and recognize common respiratory emergencies.
4 Cardiology and Resuscitation
Review cardiac assessment and emergencies, adult and pediatric CPR, AED use, and special resuscitation priorities for EMTs.
4 Cardiology and Resuscitation
A medium-difficulty quiz on EMT cardiovascular assessment, cardiac emergencies, CPR, AED use, and special resuscitation considerations.
4 Cardiology and Resuscitation
Learn how EMTs assess cardiac emergencies, recognize poor perfusion, and provide prompt care for cardiac arrest and other resuscitation situations.
6 Medical Emergencies
Review EMT priorities and key recognition and care principles for neurologic, metabolic, respiratory, toxicologic, behavioral, and environmental emergencies.
6 Medical Emergencies
A medium-difficulty quiz on recognizing and responding to medical emergencies within EMT scope and local protocols.
6 Medical Emergencies
Learn how EMTs approach medical emergencies, recognize time-sensitive conditions, provide care within their scope and local protocols, and arrange appropriate transport.
7 Obstetrics, Gynecology, and Pediatric Emergencies
A medium-difficulty quiz on practical assessment, treatment, and transport decisions in obstetric, gynecologic, neonatal, and pediatric emergencies.
8 EMS Operations
A medium-difficulty quiz on applying EMT operational principles to scene safety, communication, incident management, patient rights, and coordinated care.
9 Comprehensive EMT Practice Scenarios and Review
Review EMT exam domains and the priorities, interventions, and responsibilities that guide safe care in common emergency scenarios.
9 Comprehensive EMT Practice Scenarios and Review
Practice applying EMT scene safety, assessment, intervention, transport, and operational principles to realistic situations.