0
0
Linux CLIscripting~10 mins

chown (change ownership) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to change the owner of the file example.txt to user alice.

Linux CLI
chown [1] example.txt
Drag options to blanks, or click blank then click option'
A-R
Balice
Croot
Dexample.txt
Attempts:
3 left
💡 Hint
Common Mistakes
Using the filename as the owner.
Using flags like -R instead of the owner name.
2fill in blank
medium

Complete the command to change the owner of the directory docs and all its contents recursively to user bob.

Linux CLI
chown [1] bob docs
Drag options to blanks, or click blank then click option'
A-R
B-v
C-f
D-h
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the recursive flag and only changing the directory itself.
Using flags that do not affect recursion.
3fill in blank
hard

Fix the error in the command to change the owner of file.txt to user carol.

Linux CLI
chown carol [1]
Drag options to blanks, or click blank then click option'
Afile.txt
Bdocs
C-R
Dcarol
Attempts:
3 left
💡 Hint
Common Mistakes
Using a flag instead of the filename.
Repeating the owner name instead of the filename.
4fill in blank
hard

Fill both blanks to change the owner to dave and the group to staff for the file report.txt.

Linux CLI
chown [1]:[2] report.txt
Drag options to blanks, or click blank then click option'
Adave
Bstaff
Cusers
Dadmin
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping owner and group positions.
Using incorrect group names.
5fill in blank
hard

Fill all three blanks to recursively change the owner to eve, the group to developers for the directory project.

Linux CLI
chown [3] [1]:[2] project
Drag options to blanks, or click blank then click option'
A-v
Bdevelopers
C-R
Deve
Attempts:
3 left
💡 Hint
Common Mistakes
Placing flags in the wrong order.
Forgetting the recursive flag.
Mixing up owner and group names.