Bird
0
0

Which command correctly changes the owner of file.txt to user alice without modifying the group?

easy📝 Syntax Q3 of 15
Linux CLI - File Permissions and Ownership
Which command correctly changes the owner of file.txt to user alice without modifying the group?
Achown alice file.txt
Bchown alice: file.txt
Cchown :alice file.txt
Dchown alice:alice file.txt
Step-by-Step Solution
Solution:
  1. Step 1: Understand syntax

    chown user[:group] file changes owner and optionally group.
  2. Step 2: Changing only owner

    Using chown alice file.txt changes only the owner to alice, leaving group unchanged.
  3. Step 3: Analyze other options

    chown alice: file.txt sets group to empty (invalid), chown :alice changes only group, chown alice:alice changes both owner and group.
  4. Final Answer:

    chown alice file.txt -> Option A
  5. Quick Check:

    Check ls -l file.txt owner [OK]
Quick Trick: Use chown user file to change owner only [OK]
Common Mistakes:
  • Adding colon without group sets group to empty
  • Confusing owner and group fields
  • Using invalid user or group names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes