Linux and Unix chown command

Quick links

About chown
Syntax
Examples
Related commands
Linux and Unix main page

About chown

Command for system V that changes the owner of a file.

Syntax

chown [-R] newowner filenames

 

-RChange the permission on files that are in the subdirectories of the directory that you are currently in.
newownerThe alias/username of the new owner of the file.
filenamesThe file that you are changing the rights to.

Examples

chown chope file.txt

Give permissions as owner to user chope for the file file.txt.

chown -R chope work

Give chown permissions to chope for all files in the work directory.

Related commands

chmod
ls