Timedora
Free Practice Quiz Question List

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.

20 questions
01
Choose one
1 point

A command returns command not found. Which set of checks is most appropriate to start troubleshooting?

  1. A

    Check whether the target is a directory.

  2. B

    Check the command spelling, installation, and command search path.

  3. C

    Add elevated privileges before trying again.

  4. D

    Assume the command succeeded silently.

02
Choose all
1 point

You see No such file or directory. Select all checks that are appropriate for diagnosing the problem.

  1. A

    Check the current directory.

  2. B

    Assume the file exists and add sudo.

  3. C

    Check path spelling and capitalization.

  4. D

    Check whether the named file or a parent directory exists.

03
Written response
1 point

What status does Bash commonly return when it cannot find a command? Enter the status code only.

04
Fill in the blank
1 point

When diagnosing Permission denied, check whether you have permission to the target.

05
Open ended
1 point

Describe a safe, systematic process for troubleshooting a command-line error, including how you would make and verify a correction.

06
Choose one
1 point

A command reports too many arguments or acts on unexpected extra files. Which explanation is a reasonable troubleshooting lead?

  1. A

    The command necessarily succeeded silently.

  2. B

    The target necessarily lacks execute permission.

  3. C

    An unquoted wildcard or spaces in a path may have split the input into multiple arguments.

  4. D

    The shell necessarily failed to find the command.

07
Choose all
1 point

A command produces no output. Select all explanations that may be possible, according to the command's behavior.

  1. A

    The command may have succeeded silently.

  2. B

    The command may have found no matches.

  3. C

    The command must have failed.

  4. D

    An explanation may have been sent to standard error.

08
True or false
1 point

In Bash, an exit status should always be interpreted as a universal success-or-failure signal, without considering which command produced it.

  1. A

    True

  2. B

    False

09
Written response
1 point

If a command appears to produce no output, which output stream may contain an explanation instead of standard output?

10
Fill in the blank
1 point

With a command not found error, check the command’s and whether it is installed and on the .

11
Choose one
1 point

A command reports No such file or directory. Which check is most directly relevant?

  1. A

    Add elevated privileges and rerun the command.

  2. B

    Check the current directory, path spelling, capitalization, and whether the file or a parent directory exists.

  3. C

    Use a force option to bypass the error.

  4. D

    Assume the command succeeded silently.

12
True or false
1 point

If a command produces no output, it may have succeeded silently; checking its status and documented behavior can help distinguish that from other explanations.

  1. A

    True

  2. B

    False

13
Written response
1 point

In Bash, which special parameter expands to the status of the most recently completed command? Enter the parameter exactly.

14
Choose one
1 point

A command reports Is a directory when given a target. What should you check?

  1. A

    The command is not installed or is misspelled.

  2. B

    The target cannot be read, written, or executed because of its permissions.

  3. C

    The command may expect a file but received a directory, or may need an option to process directories.

  4. D

    A wildcard or space in a path may have split the command into extra arguments.

15
True or false
1 point

An exit status always has the same universal meaning for every command, so it can be interpreted without considering which command ran.

  1. A

    True

  2. B

    False

16
Written response
1 point

What status does Bash commonly return when it cannot find a command? Enter the integer only.

17
Choose one
1 point

When troubleshooting a command that might change or delete files, which approach best limits the impact of a mistake?

  1. A

    Inspect or list the target first, then make a limited change and verify the result.

  2. B

    Add sudo, -f, or recursive deletion as a guess.

  3. C

    Make several changes at once so fewer retries are needed.

  4. D

    Delete the target immediately if the error message is unclear.

18
Choose one
1 point

A command reports too many arguments or unexpectedly processes extra files. Which issue should you check?

  1. A

    The command completed silently and sent a message to standard error.

  2. B

    The target directory does not exist.

  3. C

    The target's permissions prevent the operation.

  4. D

    An unquoted wildcard expanded, or spaces in a path split it into multiple arguments.

19
Choose one
1 point

A shell reports command not found. Which checks are the most relevant first steps?

  1. A

    Add sudo and repeat the command.

  2. B

    Check the spelling, installation, and command search path.

  3. C

    Change the current directory to the command's parent directory.

  4. D

    Quote every argument and retry without inspecting the command.

20
Choose one
1 point

A command reports Permission denied for a target. What is the best initial response?

  1. A

    Assume the file is missing and recreate it.

  2. B

    Use a force option to bypass the restriction.

  3. C

    Check the relevant access permissions before deciding what to do.

  4. D

    Recursively delete the target and try again.