Question 190
In a Linux Essentials study lab, the student observes: A learner changes into a deeply nested directory and wants to return immediately to the account's home folder. What should an instructor recommend for subsequent exercises?
Explanation
Correct Answer
Teach home-directory shorthand without assuming every account uses /home/username. This practice reduces recurrence of the same problem. Technical reason: The tilde is expanded by the shell to a home-directory path in suitable unquoted contexts. A controlled repeat test should show: pwd reports the expected home directory after changing from a deeply nested folder.
Incorrect Answers
“Teach dotfile visibility before asking students to inspect configuration in home directories” acts on a neighboring technical dependency: Teach dotfile visibility before asking students to inspect configuration in home directories. It does not resolve the stated condition, whose causal mechanism is: Teach home-directory shorthand without assuming every account uses /home/username. The required action is “Teach home-directory shorthand without assuming every account uses /home/username”.
This option would change the part of the system described by: Run recursive listings on manageable paths to avoid excessively large output. The reported behavior instead arises because teach home-directory shorthand without assuming every account uses /home/username. The direct remediation is “Teach home-directory shorthand without assuming every account uses /home/username”.
Use absolute paths for scripts that cannot depend on an interactive current directory. That explains why “Use absolute paths for scripts that cannot depend on an interactive current directory” is useful for its own dependency, but the present failure follows a different constraint: Teach home-directory shorthand without assuming every account uses /home/username. The targeted correction is “Teach home-directory shorthand without assuming every account uses /home/username”.