1. Computing

Discuss in my forum

Example uses of the command "newgrp"

An Introductory Tutorial


With the newgrp command you can change the default group associated with your login id, assuming you are a member of multiple groups. For example if you are a member of the groups "baseball" and "racquetball", and "baseball" is your current default group, you can switch to the other group with the following command:
newgrp racquetball
Now, any files or directories you are creating have racquetball as their group ownership, meaning the group permissions set for files and directories apply to this group.

You can change the group ownership of existing files and folders with the command chgrp.

©2014 About.com. All rights reserved.