chown

Changes the owner of a file

chown [options] owner:group file-list

chown [options] --reference=rfile file-list

The chown utility changes the owner of a file.

Arguments

The owner:group is the name or numeric user ID of the new owner of the file and/or the name or numeric group ID of the new group that the file is associated with, as specified following:

  • owner The new owner of file-list; the group is not changed

  • owner:group The new owner and new group association of file-list

  • owner: The new owner of file-list; the group association is changed to that of the new owner's login group

  • :group The new group associated with file-list; the owner is not changed

The file-list is a list of pathnames of the files whose ownership you want to change.

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.