Bird
0
0

You try to change directory using cd /home/user/docs but get an error. Which of the following is the most likely cause?

medium📝 Debug Q6 of 15
Linux CLI - Navigating the File System
You try to change directory using cd /home/user/docs but get an error. Which of the following is the most likely cause?
AThe path is relative, not absolute
BThe directory /home/user/docs does not exist
CYou forgot to use './' before the path
DYou need to use 'cd ..' instead
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command and error

    'cd /home/user/docs' uses an absolute path. Error usually means directory missing.
  2. Step 2: Evaluate other options

    Path is absolute, so The path is relative, not absolute is wrong. './' is for relative paths, so C is wrong. 'cd ..' moves up directory, unrelated to error.
  3. Final Answer:

    The directory /home/user/docs does not exist -> Option B
  4. Quick Check:

    cd error usually means directory missing [OK]
Quick Trick: Check if directory exists before cd [OK]
Common Mistakes:
  • Assuming path is relative
  • Using './' unnecessarily
  • Confusing 'cd ..' with path errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes