Bird
0
0

You run whereis ls but it only returns ls: with no paths. What could be wrong?

medium📝 Debug Q7 of 15
Linux CLI - Searching and Finding
You run whereis ls but it only returns ls: with no paths. What could be wrong?
Als command is not installed
BThe <code>whereis</code> database is outdated or missing
CYou need to run <code>whereis -a ls</code> to get results
D<code>whereis</code> only works for scripts, not binaries
Step-by-Step Solution
Solution:
  1. Step 1: Understand whereis relies on database

    whereis uses a database that can be outdated or missing.
  2. Step 2: Check other options

    ls is always installed; -a lists all but won't help if database empty; whereis works for binaries.
  3. Final Answer:

    The whereis database is outdated or missing -> Option B
  4. Quick Check:

    No paths from whereis means database issue [OK]
Quick Trick: Update whereis database if no paths show [OK]
Common Mistakes:
  • Assuming command is missing
  • Expecting whereis to find aliases
  • Using wrong flags to fix output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes