1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

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.

  1. About.com
  2. Technology
  3. Linux
  4. Linux / Shell Commands
  5. Example uses of the Linux Command newgrp

©2014 About.com. All rights reserved.