newgrp command is used to change the current group ID during a login session. For example, if you create a group named developers, all members of that group will be able to log in (on the terminal) using the group name. For students or new users looking for a Linux system to start learning on, the easiest place to start is Ubuntu Linux OS. It’s a great Linux operating system for beginners. About newgrp command: The newgrp command lets you change to a new group ID (GID) while logged into your current working directory, but access permissions are calculated according to the new real and effective group IDs. Syntax: The syntax is the rule and format of how the newgrp command can be used. These syntax options can be reordered, but a straight format must be followed.,. Below is an example syntax of how to use the newgrp command. Options: The command line options are switches or flags that determined how the commands are executed or controlled. they modify the behavior of the commands. they are separated by spaces and followed after the commands. Below are some options for the newgrp command: Examples: Below are some examples of how to run and use the newgrp on Ubuntu Linux. Simply run the newgrp to invoke it. If you want to use the newgrp command login to the developer’s group, you simply run the commands below: Example: When you run the above command and you are not a member of the developer’s group and not a root, then you’ll be prompted for a group password if your account doesn’t have a password assigned. If you’re listed as a member of the group and the group has a password assigned, then you won’t be prompted. If there is no group password set, and the user is not listed as a member of the group, the user will be denied access. If you’re root, then no prompt is presented. If you want to use the newgrp command to log in to the group developers, and, if successful, re-initialize the user environment. Example: To test it out, create a new group, then add your account to the group and enable the group password. After that, test the newgrp command That’s it! Congratulations! You have learned how to use the newgrp command on Ubuntu.