Set a file's group without changing owner.

Section: Ownership and umask

Change group

bash
bash
chgrp developers shared.txt

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Ownership and umask
Change owner and group
Set file owner and group together.
OpenIn sheetbashsame section
Recursively change ownership
Update owner and group across a tree.
OpenIn sheetbashsame section
Show and set umask
Inspect and change default permission mask.
OpenIn sheetbashsame section
Add execute permission for user
Grant user execute permission.
Set setuid bit
Set executable to run with owner's effective UID.
Replace symlink atomically-ish
Create or update a symlink target with force.