chown Command Examples

Change user and group ownership of files and directories. More information: https://www.gnu.org/software/coreutils/manual/html_node/chown-invocation.html.

chown {{user}} {{path/to/file_or_directory}}

chown {{user}}:{{group}} {{path/to/file_or_directory}}

chown {{user}}: {{path/to/file_or_directory}}

chown -R {{user}} {{path/to/directory}}

chown -h {{user}} {{path/to/symlink}}

chown --reference {{path/to/reference_file}} {{path/to/file_or_directory}}