Linux Chgrp Command for Beginners (5 Examples)

1355

Here at HowtoForge, we recently discussed the chown command which lets users change the owner as well as group of file (or a directory) in Linux. But did you know there exists a dedicated command line utility that you can use when it comes to changing group-related information? The tool in question is chgrp, and in this tutorial, we will be discussing this tool using easy to understand examples.

But before we do that, it’s worth mentioning that all examples and instructions mentioned in this tutorial have been tested on Ubuntu 16.04LTS.

Linux chgrp command

As you’d have already understood by now, if the requirement is to only change the group of a file or directory, then you can use chgrp instead of chown. The tool provides several command line options that you can use in different situations. Here’s the generic syntax of chgrp:

Read more at HowToForge