$
Learn Linux handbook
en
XP:0
Quest 33Owner
+250 XP

Changing File Ownership

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

Imagine buying a house and having to officially register the deed under a new owner's name. In Linux, every file and folder has an official owner and a group. If you need to hand a file's ownership over to someone else (like the system administrator), you use the chown (change owner) command.

- Because changing who owns a file is a sensitive security action, you must prefix it with sudo to run it with administrative privileges. E.g., sudo chown root reports.csv assigns the file to the user "root".

Let's transfer ownership. Change the owner of /home/learner/reports.csv to the administrator root by running sudo chown root reports.csv.

Command Syntax Reference

Command / SyntaxDescription
sudo chown root reports.csvChange owner of reports.csv to root

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Run the "chown" command with sudo
  • ○
    Set owner of reports.csv to root

Ready to complete Quest 33?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.