CHGRP(1)
π CHGRP(1) π
okay bestie, welcome to the chgrp manual page, part of the GNU coreutils bag π it lives in section 1 (User Commands) and honestly? it's a whole vibe. let's get into it.
β¨ NAME β¨
chgrp β change group ownership π
πΈ SYNOPSIS πΈ
chgrp [OPTION]... GROUP FILE...
chgrp [OPTION]... --reference=RFILE FILE...
π¦ DESCRIPTION π¦
So what are we doing here? We're changing the group of each FILE to GROUP. π« And if you roll with --reference, you change the group of each FILE to the group of RFILE instead. icon status tbh.
here's every single option, no skips, no shortcuts, we're doing the full tour:
-c,--changesβ it's giving verbose, but the glow-up is that it only reports when an actual change is made β¨-f,--silent,--quietβ suppresses most error messages. shhh. not the drama today π-v,--verboseβ outputs a diagnostic for every file processed. every. single. one. she's chatty and we love her π¬--dereferenceβ affects the referent of each symbolic link rather than the symbolic link itself. and bestie, this is the default π-h,--no-dereferenceβ affects symbolic links instead of any referenced file. heads up tho: this is only useful on systems that can change the ownership of a symlink π«Ά--from=CURRENT_OWNER:CURRENT_GROUPβ only changes the ownership of each file if its current owner and/or group match what you specify here. either one may be omitted, and if it's omitted then a match isn't required for the omitted attribute. conditioned slay π--no-preserve-rootβ does not treat/specially. and yes, that's the default. no cap π--preserve-rootβ fails to operate recursively on/. protective queen behavior π‘οΈ--reference=RFILEβ uses RFILE's ownership instead of you specifying values. and RFILE is always dereferenced if it's a symbolic link, no exceptions π-R,--recursiveβ operates on files and directories recursively. we're going deep π
the next lil squad? these modify how a hierarchy is traversed when the -R option is also specified. and real talk: if more than one of them is specified, only the final one takes effect. also -P is the default. noted. periodt.
-Hβ if a command line argument is a symlink to a directory, traverse it πͺ-Lβ traverse every symbolic link to a directory encountered π₯-Pβ do not traverse any symbolic links π«
and finally, the two classics:
--helpβ display this help and exit π--versionβ output version information and exit π·οΈ
π EXAMPLES π
okay show-and-tell time, these are the receipts:
chgrp staff /u
Change the group of /u to "staff". π
chgrp -hR staff /u
Change the group of /u and subfiles to "staff". π recursive AND symlink-aware, she contains multitudes.
π AUTHOR π
Written by David MacKenzie and Jim Meyering. absolute legends, we stan π«Ά
π REPORTING BUGS π
found a bug? tell the devs, don't be shy:
- Report bugs to:
bug-coreutils@gnu.orgπ§ - GNU coreutils home page: <https://www.gnu.org/software/coreutils/> π
- General help using GNU software: <https://www.gnu.org/gethelp/> π
- Report any translation bugs to <https://translationproject.org/team/> π£οΈ
π SEE ALSO π
Full documentation <https://www.gnu.org/software/coreutils/chgrp> or available locally via: info '(coreutils) chgrp invocation' π
Packaged by Ubuntu (9.10-1ubuntu2) β that's the packaging note, keep it in mind if you're filing stuff π
Copyright Β© 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. β οΈ (fr fr, no warranty, read the license)
and that's the whole page bestie π this doc is from GNU coreutils 9.10, dated August 2026 β so if you're reading this in the future, hi, slay, go change some groups πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms