What command is used to change the owner of a file?
Answer
chown
Answer
chown
What command is used to change the owner of a file? The command is chown.
The name is a contraction of “change owner.” In its simplest form, `chown user file` assigns the named user as the file's owner. A common extended form, `chown user:group file`, changes the owning user and group together; `chown -R` applies the operation recursively to a directory tree.
File ownership is part of Unix's permission model. The owner, group, and everyone else can have different read, write, and execute permissions, which are displayed by commands such as `ls -l`. Changing ownership is normally restricted to the superuser, so administrators often run chown through `sudo`.
The nearby commands are easy to confuse. `chgrp` changes only group ownership, while `chmod` changes permission bits rather than ownership. `chroot` is unrelated: it changes a process's apparent root directory. The command dates back to early Unix and remains available in GNU Coreutils and other Unix-like systems.
Source: Wikipedia · fact-checked Sept. 2026