Bird
0
0

What will be the output of this command sequence?

medium📝 Command Output Q5 of 15
Linux CLI - Navigating the File System
What will be the output of this command sequence?
cd /etc
cd ..
pwd
A/etc
B/usr
C/
D/home
Step-by-Step Solution
Solution:
  1. Step 1: Follow the first cd command

    "cd /etc" moves to the /etc directory.
  2. Step 2: Follow the second cd command

    "cd .." moves up one level to the parent of /etc, which is /.
  3. Step 3: Check the pwd output

    "pwd" prints the current directory, now /.
  4. Final Answer:

    / -> Option C
  5. Quick Check:

    Output after cd /etc + cd .. + pwd = / [OK]
Quick Trick: cd .. moves up one directory level [OK]
Common Mistakes:
  • Assuming cd .. stays in same folder
  • Confusing root with home directory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes