Bird
0
0

You run ls -la /home/user but get an error: ls: cannot access '/home/user': No such file or directory. What is the most likely cause?

medium📝 Debug Q14 of 15
Linux CLI - Navigating the File System
You run ls -la /home/user but get an error: ls: cannot access '/home/user': No such file or directory. What is the most likely cause?
A/home/user directory does not exist
BYou forgot to add the -a option
CYou need to run the command as root
DThe ls command is misspelled
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the error message

    The error says the directory '/home/user' cannot be accessed because it does not exist.
  2. Step 2: Check other options

    Options -a and running as root do not cause this error; misspelling ls would cause a different error.
  3. Final Answer:

    /home/user directory does not exist -> Option A
  4. Quick Check:

    Directory missing = cannot access error [OK]
Quick Trick: Check if directory exists before blaming options [OK]
Common Mistakes:
MISTAKES
  • Assuming missing -a causes error
  • Thinking root is always needed
  • Confusing command misspelling with directory missing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes