Bird
0
0

If you run these commands in order:

medium📝 Command Output Q13 of 15
Linux CLI - Navigating the File System
If you run these commands in order:
cd /usr/local
pwd
What will be the output of pwd?
A/usr
B/usr/local
C/local
D/home/user
Step-by-Step Solution
Solution:
  1. Step 1: Understand the cd command effect

    The command cd /usr/local changes the current directory to /usr/local.
  2. Step 2: Check what pwd outputs

    After changing directory, pwd prints the full path of the current directory, which is /usr/local.
  3. Final Answer:

    /usr/local -> Option B
  4. Quick Check:

    cd changes directory, pwd shows it [OK]
Quick Trick: pwd shows the directory set by last cd command [OK]
Common Mistakes:
MISTAKES
  • Assuming pwd shows only part of the path
  • Confusing directory names
  • Thinking pwd shows home directory always

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes