Bird
0
0

What does the command cd /var/log do in a Linux terminal?

easy📝 Conceptual Q1 of 15
Linux CLI - Navigating the File System
What does the command cd /var/log do in a Linux terminal?
AChanges the current directory to /var/log
BDeletes the /var/log directory
CLists files in /var/log directory
DCreates a new directory named /var/log
Step-by-Step Solution
Solution:
  1. Step 1: Understand the cd command

    The cd command is used to change the current working directory in the terminal.
  2. Step 2: Analyze the given path

    The path /var/log is an absolute path, so cd will move the shell to that directory.
  3. Final Answer:

    Changes the current directory to /var/log -> Option A
  4. Quick Check:

    cd command changes directory = A [OK]
Quick Trick: cd moves you to the specified directory path [OK]
Common Mistakes:
  • Thinking cd deletes or lists files
  • Confusing cd with mkdir or ls

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes