search
[last updated: 2025-02-207
Linux home page
Linux commands
directory listing colors
-----
----------
----------
----------
===========================================
===========================================
chown command is used to change the file Owner or group.
chown [options] new_owner[:new_group] file(s)
Here’s a breakdown of the components:
`chown`: The base command.
`options`: Optional flags that modify the behavior of the `chown` command.
`new_owner[:new_group]`: The new owner and optionally the new group. If `new_group` is omitted, only the owner is changed.
`file(s)`: The file or files for which ownership is to be changed.
-----
When the goal is to change only the group ownership of a file, we use this syntax:
chown :group1 file1.txt
-----
For simultaneous change in both of the owner and group of a file, we use the following syntax:
chown master:group1 file1.txt
-----
-------------------------------------------------------
.
.
.
eof