The chown command is used to change the owner and group of files or directories. The superuser permission is required to use this command.
Introduction
The chown command is used to change the owner and group of files or directories. This command requires the permissions of the Super User.
========================================================== ====
Format
Chown [ower] [: [group] file...
========================================================== ====
Description
The chown command changes the file owner, the group to which the file belongs, or both of them, depending on the first parameter of the command.
========================================================== ====
Some Parameter examples
Parameters |
Result |
Bob |
Change the file owner from the current owner to user bob. |
Bob: users |
Change the file owner from the current owner to user bob, and change the group to user group. |
: Admins |
Change the group to which the file belongs to the admins group, and the file owner remains unchanged. |
Bob: |
Change the file owner from the current owner to user bob, and change the group to which bob belongs when logging on to the system. |
========================================================== ====