Bird
0
0

After running these commands:

medium📝 Command Output Q5 of 15
Linux CLI - Navigating the File System
After running these commands:
mkdir testdir
cd testdir
pwd
What will be the output of pwd?
A/testdir
Btestdir
C/home/user/testdir
D/home/testdir
Step-by-Step Solution
Solution:
  1. Step 1: Understand directory creation and navigation

    mkdir testdir creates a folder in the current directory (assumed to be /home/user). cd testdir moves into that folder.
  2. Step 2: Determine pwd output

    pwd prints the full path, which is /home/user/testdir.
  3. Final Answer:

    /home/user/testdir -> Option C
  4. Quick Check:

    pwd shows full path after cd into new folder [OK]
Quick Trick: pwd always shows full absolute path, not just folder name [OK]
Common Mistakes:
  • Expecting relative path
  • Ignoring full path
  • Confusing mkdir with cd

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes