chown Command Examples

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

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}}